
/* 全局样式设置 */
body {
    font-family: 'Roboto', sans-serif; /* 使用Roboto字体，确保现代感与易读性 */
    line-height: 1.6; /* 提高文本的可读性 */
    color: #333333; /* 主文本颜色，保持高对比度 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 背景使用渐变色，增加深度感 */
    margin: 0;
    padding: 0;
}

/* 文字阴影和盒子阴影，提高文本和元素的层次感 */
h2, h3, h4 {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    color: #ffffff; /* 标题颜色为白色，突出显示 */
}

p {
    font-size: 16px; /* 正文字号设置为16px，适中易读 */
    color: #f0f0f0; /* 正文颜色使用浅灰色，减少视觉疲劳 */
    margin-bottom: 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(32, 58, 67, 0.9); /* 半透明深色背景 */
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar a {
    color: #f0f0f0;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar a:hover {
    color: #ff6f00; /* 悬停时颜色变化为橙色，符合点缀色要求 */
    transform: scale(1.1); /* 轻微放大，增强交互感 */
}

/* 主横幅样式 */
.header-banner {
    background: linear-gradient(135deg, #002f6c, #00509e); /* 深蓝色渐变背景 */
    color: #ffffff;
    padding: 100px 20px;
    text-align: center;
    background-image: url('https://images.gptkong.com/demo/sample1.png'); /* 背景图像 */
    background-size: cover;
    background-position: center;
    position: relative;
}

.header-banner::after {
    content: "这是一个网页样式设计参考"; /* 显著提示文本 */
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    background: rgba(0, 47, 108, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* 容器设置，确保内容居中且有适当的宽度 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

/* 卡片样式，包含图像和文本 */
.card {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px); /* 悬停时上升 */
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

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

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    color: #f0f0f0;
}

article h2, article h3, article h4 {
    color: #ffffff;
}

article pre {
    background: rgba(0, 47, 108, 0.8); /* 代码块背景 */
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

article code {
    color: #ff6f00; /* 代码颜色为点缀色 */
    font-family: 'Courier New', Courier, monospace;
}

/* 底部地图和图表样式 */
.footer-map {
    background: rgba(32, 58, 67, 0.9);
    padding: 60px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    color: #ffffff;
}

.map-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.map-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.map-item .info {
    position: absolute;
    bottom: 0;
    background: rgba(255, 111, 0, 0.8); /* 点缀色背景 */
    width: 100%;
    padding: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-item:hover .info {
    opacity: 1; /* 显示信息 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .container {
        grid-template-columns: 1fr;
    }
    
    .footer-map {
        grid-template-columns: 1fr;
    }
}

/* 互动式折叠区域样式 */
.collapsible {
    background-color: rgba(32, 58, 67, 0.9);
    color: #ffffff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    margin-bottom: 10px;
}

.collapsible:hover {
    background-color: rgba(255, 111, 0, 0.8); /* 悬停时背景变为点缀色 */
}

.active, .collapsible:focus {
    background-color: rgba(255, 111, 0, 0.8);
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    margin-bottom: 20px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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