/* 页面背景 */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: url('/images/bg.png') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    height: 100%;
    overflow-x: hidden; /* 防止横向滚动条 */
}

/* 固定导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0); /* 初始完全透明 */
    padding: 20px 20px;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 1s ease, opacity 1s ease, background-color 0.5s ease; /* 添加背景透明度渐变过渡 */
    opacity: 0; /* 初始透明，等待 Hero 完成动画后显示 */
    pointer-events: none; /* 防止透明时交互 */
}

header.hidden {
    transform: translateY(-100%); /* 向上隐藏 */
}

header.visible {
    opacity: 1;
    pointer-events: auto; /* 恢复交互功能 */
}

header:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 导航栏列表样式 */
nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #007BFF;
}

/* Hero 区域动态展开效果 */
#hero {
    position: relative;
    width: 100%;
    height: 100vh; /* 初始全屏 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    z-index: 10;
    animation: heroFadeIn 2s ease forwards; /* Hero 动画 */
}

/* V 形箭头样式 */
#scroll-arrow {
    position: absolute;
    bottom: 60px; /* 距离底部一定距离 */
    animation: bounce 1.5s ease-in-out infinite; /* 动画效果 */
    cursor: pointer; /* 鼠标悬停时显示手形指针 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* 确保箭头在所有其他元素之上 */
}

#scroll-arrow svg {
    width: 60px;
    height: 60px;
    fill: white; /* 白色箭头 */
}

/* 向下滚动箭头的动画 */
@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(15px); /* 向下最大偏移 */
    }
    100% {
        transform: translateY(0);
    }
}

#hero h1 {
    margin: 0;
    font-size: 4rem; /* 初始字体大小 */
    transition: font-size 0.8s ease, transform 0.8s ease; /* 添加平滑过渡 */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 2s forwards; /* 初始动画 */
}

#hero p {
    margin: 0;
    font-size: 2rem; /* 初始字体大小 */
    transition: font-size 0.8s ease, transform 0.8s ease; /* 添加平滑过渡 */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 2s forwards; /* 初始动画 */
}

#hero .page-section {
    margin: 0;
    font-size: 2rem; /* 初始字体大小 */
    transition: font-size 0.8s ease, transform 0.8s ease; /* 添加平滑过渡 */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 2s forwards; /* 初始动画 */
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 其他页面样式 */
.page-section {
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px 36px;
    margin: 120px auto;
    backdrop-filter: blur(5px);
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-section:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .page-section {
        width: 95%;
        padding: 15px;
    }

    nav ul li a {
        font-size: 16px;
    }
}

/* 注脚样式 */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    position: relative;
    margin-top: 200px;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.footeri {
    margin-top: 10px;
}

.footeri a {
    margin-right: 12px;
    font-size: 16px;
    text-decoration: none;
    color: white;
}

/* 回到顶部按钮样式 */
#back-to-top {
    position: fixed;
    
    bottom: 18%; /* 距离底部 */
    right: 6%; /* 距离右侧 */
    width: 60px; /* 调整按钮宽度 */
    height: 80px; /* 调整按钮高度 */
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    border-radius: 10px; /* 圆角按钮 */
    display: flex;
    flex-direction: column; /* 垂直排列箭头和文字 */
    justify-content: center; /* 垂直居中 */
    align-items: center; /* 水平居中 */
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 10px 15px; /* 内边距调整 */
    font-size: 18px; /* 调整字体大小 */
}

#back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    transform: scale(1.02); /* 鼠标悬停时放大效果 */
}

/* 箭头样式 */
#arrow-up {
    font-size: 24px; /* 调整箭头的字体大小 */
    margin-top: 6px;
}

/* TOP 文本样式 */
#top-text {
    font-size: 14px; /* 调整文字大小 */
    margin-top: 6px; /* 文字和箭头之间的间距 */
    
}


/*articles相关*********************************************************************************/
/* 文章目录区域，去除默认样式 */
#article-list {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

/* 一级目录样式 */
.category {
    margin-bottom: 10px;
}

/* 一级目录标题样式，带有轻微的背景和圆角 */
.category-title {
    font-size: 1.5rem;
    color: #343434;
    padding: 5px 10px;
    display: inline-block;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

/* 一级目录标题悬停效果 */
.category-title:hover {
    background-color: rgba(34, 34, 34, 0.4); /* 背景颜色轻微变化 */
    color: #fff;
}

/* 二级目录列表样式，直接显示，带有左侧内边距 */
.subcategory {
    padding-left: 60px;
    list-style-type: disc; /* 使用圆点符号 */
    margin-top: 8px;
    display: block;
}

/* 二级目录项目样式 */
.subcategory li {
    margin: 6px 0;
}

/* 二级目录链接基础样式 */
.subcategory li a {
    text-decoration: none;
    color: #343434;
    font-size: 1rem;
    transition: color 0.2s;
    padding: 2px 4px;
    display: inline-block;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;

}

/* 二级目录链接悬停时的效果 */
.subcategory li a:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    color: #000000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 页面标题样式，增加线条感 */
.page-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #343434;
    padding-bottom: 5px;
}
/*articles相关*********************************************************************************/



/*deepseek相关**********************************************************************************/
/* DeepSeek 聊天框 */
#deepseek-chat {
    width: 90%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.8); /* 半透明背景 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    border-radius: 10px; /* 圆角 */
    padding: 20px 36px; /* 内边距 */
    margin: 80px auto; /* 居中 */
    backdrop-filter: blur(5px); /* 背景模糊 */
    color: #333; /* 文字颜色 */
    font-size: 16px; /* 字体大小 */
    line-height: 1.6; /* 行高 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 过渡效果 */
}

/* 聊天历史记录 */
#chat-history {
    min-height: 400px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 20px;
    background-color: transparent; /* 移除背景色 */
    border: none; /* 移除边框 */
}

/* 用户消息泡泡 */
.user-message {
    margin-bottom: 15px;
    text-align: right;
}

.user-message .message-content {
    display: inline-block;
    background-color: #333; /* 深灰色背景 */
    color: #fff; /* 白色文字 */
    padding: 10px 15px;
    border-radius: 8px 8px 8px 8px; /* 泡泡圆角 */
    max-width: 60%;
    position: relative;
}

.user-message .message-content::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-left-color: #333; /* 深灰色三角 */
    border-right: 0;
    margin-top: -10px;
}

/* AI 消息 */
.ai-message {
    margin-bottom: 15px;
    text-align: left;
}

.ai-message .message-content {
    display: inline-block;
    background-color: rgba(233, 236, 239, 0.8); /* 浅灰色背景 */
    color: #333; /* 深灰色文字 */
    padding: 10px 15px;
    border-radius: 10px 10px 10px 10px; /* 圆角 */
    max-width: 70%;
}

/* 输入区域 */
#chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8); /* 半透明背景 */
    border: 1px solid rgba(0, 0, 0, 0.2); /* 浅色边框 */
    border-radius: 25px; /* 圆角 */
    padding: 10px;
    backdrop-filter: blur(5px); /* 背景模糊 */
}

#chat-input {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 16px;
    resize: none;
    outline: none;
}

/* 发送按钮样式 */
#send-button {
    padding: 10px;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#send-button svg {
    width: 24px;
    height: 24px;
    fill: #666; /* 灰色箭头 */
}

#send-button:hover {
    background-color: rgba(0, 0, 0, 0.05); /* 悬停背景 */
}

#send-button:hover svg {
    fill: #007bff; /* 悬停时箭头变蓝 */
}

/* 复制按钮样式 */
.copy-button {
    padding: 5px 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.copy-button:hover {
    background-color: #0056b3;
}

/* 代码块样式 */
pre {
    position: relative; /* 确保复制按钮可以定位 */
    background-color: rgba(33, 33, 33, 0.8); /* 深灰色背景 */
    padding: 40px 10px 10px 10px; /* 增加顶部内边距，为复制按钮留出空间 */
    border-radius: 10px;
    overflow-x: auto;
    margin: 10px 0;
    color: #addbf9; /* 代码文字颜色 */
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: inherit; /* 继承父元素的颜色 */
}

/* “思考中...”效果 */
.thinking-message {
    margin: 10px 0;
    padding: 10px;
    display: flex; /* 使用 Flexbox 布局 */
    align-items: center; /* 垂直居中 */
    gap: 10px; /* 文字和动画之间的间距 */
}

.thinking-text {
    font-size: 1rem;
    color: #666; /* 灰色文字 */
    margin: 0; /* 移除默认的外边距 */
}

.thinking-animation {
    width: 20px;
    height: 20px;
    border: 3px solid #333; /* 深灰色边框 */
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite; /* 旋转动画 */
    flex-shrink: 0; /* 防止动画被压缩 */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Markdown 渲染样式 */
.ai-message h1, .ai-message h2, .ai-message h3, .ai-message h4, .ai-message h5, .ai-message h6 {
    margin: 10px 0;
    font-weight: bold;
}

.ai-message h1 {
    font-size: 2rem;
}

.ai-message h2 {
    font-size: 1.75rem;
}

.ai-message h3 {
    font-size: 1.5rem;
}

.ai-message p {
    margin: 10px 0;
    line-height: 1.6;
}

.ai-message ul, .ai-message ol {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-message li {
    margin: 5px 0;
}

.ai-message pre {
    background-color: rgb(33, 33, 33, 0.8); /* 浅灰色背景 */
    padding: 10px;
    border-radius: 10px;
    overflow-x: auto;
}

.ai-message code {
    font-family: 'Courier New', Courier, monospace;
    color: #60baff; /* 蓝色文字 */
}

.ai-message blockquote {
    margin: 10px 0;
    padding-left: 10px;
    border-left: 3px solid #ccc; /* 灰色边框 */
    color: #666; /* 灰色文字 */
}
/*deepseek相关**********************************************************************************/