/* 样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
        sans-serif;
    background-color: #f6f8fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== 导航栏 ========== */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #d0d7de;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    position: relative;
}

/* 左侧 logo + 标题 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area img {
    width: 36px;
    height: auto;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2328;
}

.logo-text h3 {
    font-size: 11px;
    color: #656d76;
    font-weight: normal;
    margin-top: 2px;
}

/* 导航菜单 (桌面端) */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-menu li a {
    display: block;
    padding: 8px 12px;
    color: #1f2328;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-menu li a:hover {
    background-color: #f0f2f5;
    color: #0969da;
}

/* 优化导航菜单的动画，使其更加丝滑 */
.nav-menu {
    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 20;
    position: relative;
    top: 0;
}

.hamburger span {
    width: 100%;
    height: 2.5px;
    background-color: #1f2328;
    border-radius: 4px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ========== 移动端样式 (≤768px) ========== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .logo-area img {
        width: 32px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .logo-text h3 {
        font-size: 10px;
    }

    /* 显示汉堡按钮 */
    .hamburger {
        display: flex;
    }

    /* 导航菜单折叠状态 */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px 20px 24px;
        border-top: 1px solid #d0d7de;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition:
            transform 0.25s ease-in-out,
            opacity 0.2s ease;
        z-index: 99;
    }

    /* 菜单展开状态 */
    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f2f5;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li a {
        padding: 14px 12px;
        font-size: 16px;
    }
}

.footer {
    margin-top: auto;
    background-color: #ffffff;
    border-top: 1px solid #d0d7de;
    padding: 2rem 24px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info {
    color: #656d76;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #656d76;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #0969da;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .footer-links {
        justify-content: center;
    }
}
/* 全局设置：确保文字默认居中 */
body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.8; /* 增加行高，让居中看起来不拥挤 */
    color: #333;
    margin: 0;
    padding: 0;
    text-align: center; /* 【关键】强制所有文字居中 */
}

/* 容器：控制内容宽度，并让容器本身在页面居中 */
.container {
    width: 80%; /* 宽度设为 80%，不要太宽 */
    max-width: 900px; /* 最大不超过 900px */
    margin: 0 auto; /* 【关键】左右外边距自动，实现容器水平居中 */
    padding: 20px;
    text-align: center; /* 确保内部文字居中 */
}

/* 标题样式 */
h2 {
    color: #0056b3; /* 科技蓝 */
    font-size: 2rem;
    margin-bottom: 30px; /* 标题下方留白 */
    text-align: center; /* 标题强制居中 */
}

h3 {
    color: #444;
    margin-bottom: 10px;
}

/* 引导文字（首段） */
.lead-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
}

/* 特色板块：网格布局 */
.feature-grid {
    display: flex; /* 开启弹性布局 */
    justify-content: center; /* 【关键】让子元素（三个卡片）在中间对齐 */
    flex-wrap: wrap; /* 允许换行，适配手机 */
    gap: 30px; /* 卡片之间的间距 */
    margin-top: 40px;
}

/* 单个特色卡片 */
.feature-item {
    flex: 1 1 250px; /* 弹性伸缩，最小宽度 250px */
    background: #f9f9f9;
    padding: 30px 20px; /* 上下30px，左右20px */
    border-radius: 10px; /* 圆角 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
    text-align: center; /* 卡片内文字居中 */
}
.feature-item {
    /* 基础样式 */
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease; /* 添加过渡效果 */
}

/* 悬停时的浮动效果 */
.feature-item:hover {
    transform: translateY(-10px); /* 向上移动10px */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* 添加阴影增强浮动感 */
    background-color: #ffffff;
    border-color: #d0d0d0;
}

/* 可选：添加缩放效果 */
.feature-item:hover h3 {
    transform: scale(1.05); /* 标题轻微放大 */
    transition: transform 0.3s ease;
}

/* 可选：图标动画 */
.feature-item:hover h3::before {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}
/* 基础样式 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: sans-serif;
}

/* 按钮样式 */
.btn-group {
    text-align: center;
    margin-bottom: 30px;
}
.btn {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #f0f0f0;
    border-radius: 4px;
    margin: 0 5px;
    transition: all 0.3s;
}
.btn:hover {
    background: #e0e0e0;
}
/* 激活状态的按钮样式 */
.btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    text-align: center; /* 让内部图片居中 */
    margin: 0 auto;     /* 如果 .avatar 本身也有宽度，这行让它自己也居中 */
}
/* 让图片填满容器 */
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例填充，避免变形 */
    
}
/* --- 核心 CSS 逻辑 --- */

/* 1. 默认隐藏所有内容块 */
.content-item {
    display: none;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    animation: fadeIn 0.5s; /* 可选：添加淡入动画 */
}

/* 2. 只有带有 .active 类的元素才显示 */
.content-item.active {
    display: block;
}

/* 简单的淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
