/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面整体样式 */
body {
    font-family: "Microsoft Yahei", Arial, sans-serif;
    line-height: 1.6;
    color: #fff;
    background: url('NeistPoint.jpg') no-repeat center center fixed; 
    background-size: cover; /* 背景覆盖 */
    overflow-x: hidden; /* 禁止水平滚动 */
}

html {
    scroll-behavior: smooth;
}

.hidden {
    opacity: 0; /* 初始透明 */
    transform: translateY(20px); /* 初始向下偏移 */
    transition: opacity 1s ease, transform 1s ease;
}

.show {
    opacity: 1; /* 显示 */
    transform: translateY(0); /* 恢复原位 */
}

#preloader {
    position: fixed; /* 固定在屏幕上 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000; /* 或其他背景色 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 确保在所有内容之上 */
    transition: opacity 1s ease-in-out; /* 淡出效果 */
    opacity: 1; /* 初始不透明 */
}

#preloader.loaded {
    opacity: 0; /* 加载完成后透明 */
    pointer-events: none; /* 阻止点击事件 */
}

#loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite; /* 旋转动画 */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 背景固定部分 */
.background {
    height: 100vh;
    display: flex;
    flex-direction: column; /* 修改为纵向排列 */
    justify-content: center;
    align-items: center; /* 水平居中 */
    text-align: center;
}

.background .overlay {
    display: flex; /* 使 overlay 成为 flex 容器 */
    flex-direction: column; /* 纵向排列 */
    align-items: center; /* 水平居中 */
}

.background-avatar {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.background-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.header-avatar, .background-avatar {
    width: 50px; /* 调整头像大小 */
    height: 50px;
    border-radius: 50%; /* 使头像变成圆形 */
    overflow: hidden; /* 裁剪超出圆形部分 */
    margin-right: 10px; /* 与标题的间距 */
    box-shadow: 1px 1px 5px rgba(0,0,0,0.5); /*阴影效果*/
}

.background-avatar {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.header-avatar img, .background-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片填充整个容器，可能会裁剪 */
}

.header {
    background-color: rgba(0, 0, 0, 0); /* 初始全透明 */
    padding: 5px 20px; /* 更窄的垂直内边距 */
    position: sticky; /* 粘性定位 */
    top: 0;
    z-index: 100; /* 确保在其他内容之上 */
    width: 100%;
    box-sizing: border-box; /* 包含padding和border在宽度计算中 */
    backdrop-filter: blur(3px); /* 可选：背景模糊，增强半透明效果 */
    transition: background-color 0.3s ease, padding 0.3s ease; /* 平滑过渡 */
}

.header-content {
    display: flex;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
}


.header a {
    text-decoration: none;
    color: #fff;
    font-size: 6px;
    font-weight: bold;
    white-space: nowrap;
    flex-grow: 1;
}


.header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-shrink: 0;
}

.header nav li {
    margin-left: 20px;
}


/* 响应式设计：小屏幕调整 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column; /* 垂直排列 */
        align-items: flex-start; /* 左对齐 */
    }

    .header nav ul {
        flex-direction: column;
        margin-top: 10px;
    }

    .header {
        padding: 5px 10px; /*小屏幕上的padding*/
    }
    
      .header a {
        font-size: 0.9em;
    }

    .header nav li {
        margin-left: 10px;
    }
}

/* 滚动时样式变化 */
.header.sticky-scrolled {
    background-color: rgba(0, 0, 0, 0.7);   /*滚动后半透明*/
    padding: 5px 20px; /* 滚动后缩小padding */
}

.background h1 {
    font-size: 2.9rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* 滚动内容部分 */
.content {
    background-color: rgba(34, 34, 34, 0.96); /* 半透明深色背景 */
    padding: 3rem 1rem;
    text-align: center;
}

.content h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: #00bcd4;
}

.content p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: #ddd;
}

/* 底部部分 */
.footer {
    height: 40vh; /* 底部高度，确保能露出背景 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* 背景透明 */
    color: #fff;
    text-align: center;
}

.footer-content a {
    color: #00bcd4; /* 链接颜色 */
    text-decoration: none; /* 去除下划线 */
}

.footer-content a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

.footer-content p {
    font-size: 1rem;
    margin: 0.5rem 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}
