
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用无衬线字体，提升现代感 */
    background: linear-gradient(135deg, #2c3e50 70%, #34495e 25%, #16a085 5%); /* 采用渐变背景色，主色70%，辅色25%，点缀色5% */
    color: #ecf0f1; /* 主文字颜色为浅色，确保对比度 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.9); /* 半透明背景，增强层次感 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影效果，提升立体感 */
    transition: background 0.3s ease;
}

.navbar:hover {
    background: rgba(44, 62, 80, 1); /* 悬停时背景颜色加深 */
}

.navbar a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 15px;
    position: relative;
    transition: color 0.3s ease;
}

.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #16a085;
    transition: width 0.3s;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.navbar a:hover::after {
    width: 100%;
}

.breadcrumb {
    margin-top: 80px; /* 避免与固定导航栏重叠 */
    font-size: 14px;
    color: #bdc3c7;
    padding: 10px 30px;
}

.container {
    display: grid;
    grid-template-areas:
        "smart-life"
        "risk-management"
        "future-tech";
    gap: 40px;
    padding: 100px 30px 50px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        grid-template-areas:
            "smart-life risk-management"
            "future-tech future-tech";
        grid-template-columns: 1fr 1fr;
    }
}

/* 模块样式 */
.smart-life, .risk-management, .future-tech {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景，突出内容 */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 添加阴影，增强立体感 */
    transition: transform 0.3s ease, background 0.5s ease;
}

.smart-life:hover, .risk-management:hover, .future-tech:hover {
    transform: translateY(-10px); /* 悬停时轻微上移，增加互动感 */
    background: rgba(255, 255, 255, 0.15);
}

.smart-life {
    grid-area: smart-life;
    background: linear-gradient(to right, #ff7e5f, #feb47b); /* 使用渐变色，增强视觉效果 */
}

.risk-management {
    grid-area: risk-management;
    background: #34495e;
    color: #2ecc71; /* 辅助色用于文字，突出重点 */
}

.future-tech {
    grid-area: future-tech;
    background: #8e44ad;
    color: #fff;
    height: auto;
}

.future-tech {
    height: 100%;
}

/* 图片样式 */
.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 标题样式 */
h2, h3, h4 {
    color: #ecf0f1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 正文样式 */
p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ecf0f1;
}

/* 代码块样式 */
pre {
    background: rgba(44, 62, 80, 0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

code {
    color: #2ecc71;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.active, .collapsible:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 10px;
}

.content p {
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        grid-template-areas:
            "smart-life"
            "risk-management"
            "future-tech";
        grid-template-columns: 1fr;
    }

    .smart-life, .risk-management, .future-tech {
        padding: 20px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }

    p {
        font-size: 15px;
    }
}

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

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

/* 链接样式 */
a {
    color: #16a085;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1abc9c;
}

/* 按钮样式 */
.button {
    background: #2980b9;
    color: #ecf0f1;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background: #3498db;
    transform: scale(1.05);
}

/* 代码示例特定样式 */
.code-example {
    background: rgba(44, 62, 80, 0.9);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.code-example code {
    display: block;
    white-space: pre-wrap;
}

