/* 将原有<styl>标签中的所有CSS复制到这里 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #1a1a1a;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    overflow-x: hidden; /* 防止水平滚动 */
    -webkit-overflow-scrolling: touch; /* 支持iOS滚动 */
    position: relative; /* 改为相对定位 */
    min-height: 100vh; /* 确保最小高度为视口高度 */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    height: 100%;
}

/* 从原HTML文件中的所有CSS样式复制到这里 */
/* 包括所有的类选择器、媒体查询等 */
/* 直到原style标签结束的所有CSS内容 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #1a1a1a;  /* 将背景改得更深一些，增加层次感 */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    overflow-x: hidden; /* 防止水平滚动 */
    -webkit-overflow-scrolling: touch; /* 支持iOS滚动 */
    position: relative; /* 改为相对定位 */
    min-height: 100vh; /* 确保最小高度为视口高度 */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    height: 100%;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background-image: url('path-to-sidebar-bg.jpg'); /* 替换为侧边栏背景图片 */
    background-size: cover;
    background-position: center;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 80px 20px 20px 20px;  /* 修改顶部内边距与主内容区域一致 */
    color: #fff; /* 为了确保文字在背景图片上清晰可见 */
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* 半透明遮罩，提高文字可读性 */
    z-index: -1;
}

.sidebar.active {
    left: 0;
}

/* 侧边栏切换按钮 */
.toggle-btn {
    position: fixed;
    left: 20px;
    top: 20px;  /* 改回顶部位置 */
    transform: none;  /* 移除垂直居中变换 */
    z-index: 1003;
    cursor: pointer;
    padding: 15px;
    background: rgba(47, 47, 47, 0.9);
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.toggle-btn::before,
.toggle-btn::after,
.toggle-btn span {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* 添加间的横线 */
.toggle-btn span {
    transform: translateY(0);
}

.toggle-btn::before {
    transform: translateY(-6px);
}

.toggle-btn::after {
    transform: translateY(6px);
}

/* 激活状态时的动画 */
.toggle-btn.active span {
    opacity: 0;  /* 中间的线消失 */
}

.toggle-btn.active::before {
    transform: rotate(45deg);
}

.toggle-btn.active::after {
    transform: rotate(-45deg);
}

/* 主要内容区域 */
.main-content {
    margin: 0 240px;
    padding: 80px 20px 20px; /* 增加顶部内边距 */
    transition: all 0.3s ease;
}

.main-content.blur {
    filter: blur(5px);
}

/* 文章卡片样式 */
.article-card {
    background: rgba(47, 47, 47, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin: 0 auto 30px auto;  /* 居中显示 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    text-align: center;
    width: 66.67%;  /* 横向占屏幕2/3 */
    height: 25vh;   /* 竖向占屏幕1/4 */
    display: flex;  /* 使用flex布局 */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.article-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.article-card .article-image {
    width: 40%;     /* 图片占卡片宽度的40% */
    height: 100%;   /* 图片高度100% */
    object-fit: cover;
}

.article-card .article-content {
    padding: 20px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* 垂直居中 */
    align-items: center;     /* 水平居中 */
}

.article-card h2 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-align: center;      /* 标题文字居中 */
    width: 100%;            /* 确保标题占满容器宽度 */
}

.article-card p {
    color: #cccccc;
    line-height: 1.6;
    margin: 0 auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;  /* 限制文本行数 */
    line-clamp: 3;          /* 添加标准性 */
    -webkit-box-orient: vertical;
    box-orient: vertical;    /* 添加标准属性 */
    text-align: center;     /* 段落文字居中 */
    width: 90%;            /* 控制文本宽度，留有适当边 */
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .article-card {
        width: 80%;  /* 在较小屏幕上适当增加宽度 */
    }
}

@media screen and (max-width: 768px) {
    .article-card {
        width: 90%;
        height: auto;  /* 在移动设备上自适应高度 */
        flex-direction: column;  /* 改为垂直布局 */
    }
    
    .article-card .article-image {
        width: 100%;
        height: 200px;
    }
    
    .article-card .article-content {
        width: 100%;
        padding: 15px;    /* 移动端稍微减小边距 */
    }
    
    .article-card p {
        width: 95%;      /* 移动端略微增加文本宽度 */
    }
}

/* 可选：添加悬停效果 */
.article-card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(47, 47, 47, 0.9);
    border-radius: 5px;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    color: #fff;
    text-align: center;
    line-height: 50px;
}

.back-to-top::before {
    content: '🚀';
    font-size: 24px;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: rgba(47, 47, 47, 1);
}

/* 侧边栏小工具样式 */
.widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.widget-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #fff;
}

/* 链接样式 */
.widget a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.widget a:hover {
    color: #ddd;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 8px;
}

/* 调整第一个小部件的样式，移除顶部边距 */
.sidebar .widget:first-child {
    margin-top: 0;
}

/* 确保小部件之间的间距合适 */
.widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

/* 修改左侧介绍窗口样式 */
.left-intro {
    position: fixed;
    left: 20px;
    top: 120px;  /* 修改顶部距离，避免与导航栏冲突 */
    bottom: 120px;  /* 修改底部距离，避免与返回顶部按钮冲突 */
    width: 50px;
    background: rgba(47, 47, 47, 0.9);
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    color: #fff;
    padding: 15px 10px;
    font-size: 14px;
    line-height: 1.8;
    border-left: 3px solid #4ecdc4;
    z-index: 998;
    overflow-y: auto; /* 只保留一个overflow属性 */
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-height: calc(100vh - 240px); /* 确保有足够空间不与顶部和底部按钮重叠 */
}

/* 默认文字样式 */
.left-intro .default-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    letter-spacing: 5px; /* 增加字间距 */
}

/* 悬停时显示的文字样式 */
.left-intro .hover-text {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    text-align: center;
    letter-spacing: 2px; /* 横向文字的字间距 */
    line-height: 2; /* 增加行高 */
}

/* 悬停效果 */
.left-intro:hover {
    width: 280px; /* 增加悬停时的宽度 */
    padding: 25px; /* 增加内边距 */
}

.left-intro:hover .default-text {
    display: none;
}

.left-intro:hover .hover-text {
    display: block;
    opacity: 1;
    max-height: calc(80vh - 50px); /* 移除重复的overflow-y设置 */
    padding-right: 10px; /* 为滚动条预留空间 */
}

/* 在style标签内添加阅读更多链接的样式 */
.article-content a {
    color: #FFD700; /* 金色 */
    text-decoration: none;
    margin-top: 10px; /* 添加一些上边距 */
    font-size: 14px;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: #FFA500; /* 悬停时变为橙色 */
}

/* 移动端适配样式 */
@media screen and (max-width: 768px) {
    /* 主内容区域调整 */
    .main-content {
        margin: 0 10px;
        padding: 70px 10px 20px 10px;
    }

    /* 侧边栏调整 */
    .sidebar {
        width: 100%;
        left: -100%;
    }

    /* 返回顶部按钮位置调整 */
    .back-to-top {
        right: 20px;
        left: auto;
        bottom: 20px;
    }

    /* 导航按钮调整 */
    .toggle-btn {
        width: 40px;
        height: 40px;
        top: 10px;
    }

    .toggle-btn {
        left: 10px;
    }
}

/* 平板设备适配 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        margin: 0 60px;
    }

    .article-card {
        width: 90%;
    }
}

/* 较小屏幕的横向布局 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .article-card {
        flex-direction: row;
        height: 150px;
    }

    .article-card .article-image {
        width: 40%;
        height: 100%;
    }

    .article-card .article-content {
        width: 60%;
    }
}

/* 星星按钮样式 */
.star-btn {
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 1003;
    cursor: pointer;
    width: 50px;  /* 与左侧按钮大小一致 */
    height: 50px; /* 与左侧按钮大小一致 */
    background: rgba(47, 47, 47, 0.9);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.star-btn i {
    font-size: 24px;  /* 调整图标大小 */
    color: #fff;
    transition: transform 0.6s ease;
}

.star-btn.active i {
    transform: rotate(360deg);
}

/* 右侧边栏样式 */
.right-sidebar {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: rgba(47, 47, 47, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.right-sidebar.active {
    right: 0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.right-sidebar-content {
    color: #fff;
}

/* 右侧边栏卡片样式修改 */
.right-sidebar-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;  /* 居中对齐内容 */
}

.right-sidebar-item img {
    width: 100%;
    height: 140px;  /* 增加高度 */
    object-fit: contain;  /* 改为contain确保图片完整显示 */
    border-radius: 5px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.2);  /* 添加背景色以便于区分图片边界 */
    padding: 5px;  /* 添加内边距 */
}

.right-sidebar-item a {
    margin-top: 10px;  /* 增加链接与图片的间距 */
    padding: 5px 10px;  /* 增加链接的可点击区域 */
    width: 100%;  /* 让链接占据整个容器宽度 */
    text-align: center;  /* 文字居中 */
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .right-sidebar-item img {
        height: 120px;  /* 移动端稍微降低图片高度 */
    }
}

.right-sidebar-item:hover {
    transform: translateX(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.right-sidebar-content h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2em;
}

.right-sidebar-item p {
    margin-top: 10px;
    font-size: 14px;
    color: #eee;
}

.right-sidebar-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 主内容区域模糊效果 */
.main-content.blur {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* 右侧边栏链接样式 */
.right-sidebar-item a {
    color: #FFD700; /* 与主页卡片链接颜色一致 */
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 5px;
}

.right-sidebar-item a:hover {
    color: #FFA500; /* 悬停时与主页卡片链接一致 */
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .right-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .star-btn {
        top: 10px;
        right: 10px;
    }
}

/* 添加顶部导航栏样式 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgb(47, 47, 47); /* 使用纯色背景 */
    z-index: 1002;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    /* 添加硬件加速 */
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    /* 移除之前的backdrop-filter */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
}

.center-controls {
    display: flex;
    gap: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-btn i {
    font-size: 16px;
}

.nav-btn span {
    font-size: 14px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 修改原有按钮样式以适应新布局 */
.toggle-btn, .star-btn {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .center-controls {
        display: none; /* 在移动端隐藏中间按钮 */
    }
    
    .top-nav {
        padding: 0 10px;
    }
}

/* 工具按钮样式 */
.tool-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: rgba(47, 47, 47, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1003;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tool-btn i {
    font-size: 24px;
    color: #fff;
    transition: transform 0.3s ease;
}

/* 抖动动画 */
@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.tool-btn.active i {
    animation: shake 0.4s ease-in-out;
}

/* 底部边栏样式 */
.bottom-sidebar {
    position: fixed;
    bottom: -300px;
    left: 0;
    right: 0;
    height: 240px;
    background: rgba(47, 47, 47, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1001;
    transition: bottom 0.3s ease;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-sidebar.active {
    bottom: 0;
}

.bottom-sidebar-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    height: 100%;
}

/* 修改工具项样式 */
.tool-item {
    background: rgba(47, 47, 47, 0.9);  /* 固定背景色 */
    border-radius: 10px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-item i {
    font-size: 24px;
    color: #4ecdc4;  /* 图标使用统一的青色 */
    margin-bottom: 8px;
}

.tool-item span {
    font-size: 14px;
    color: #ffffff;  /* 文字使用纯白色 */
}

.tool-item:hover {
    transform: translateY(-5px);
    background: rgba(47, 47, 47, 0.9);  /* 悬停时保持相同背景色 */
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .tool-item i {
        font-size: 20px;
    }

    .tool-item span {
        font-size: 12px;
        color: #ffffff;  /* 确保移动端也保持白色文字 */
    }
}

/* 修改左侧介绍窗口的移动端适配 */
@media screen and (max-width: 768px) {
    .left-intro {
        display: none !important; /* 使用!important确保隐藏 */
    }

    /* 返回顶部按钮在移动端显示 */
    .back-to-top {
        display: block; /* 改为block，让JS控制显示/隐藏 */
        right: 20px;
        left: auto;
        bottom: 80px;
        z-index: 1003;
    }

    /* 顶部导航栏中间按钮在移动端显示 */
    .center-controls {
        display: flex !important; /* 确保显示 */
        gap: 10px;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
    }

    .nav-btn i {
        font-size: 16px;
    }

    /* 调整主内容区域边距 */
    .main-content {
        margin: 0 10px;
        padding: 70px 10px 20px 10px;
    }
}

/* 确保在更小的屏幕上也生效 */
@media screen and (max-width: 480px) {
    .left-intro {
        display: none !important;
    }

    .center-controls {
        display: flex !important;
    }
}

/* 修改返回顶部按钮的基础样式 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(47, 47, 47, 0.9);
    border-radius: 5px;
    cursor: pointer;
    display: none;  /* 默认隐藏，通过JS控制显示 */
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    color: #fff;
    text-align: center;
    line-height: 50px;
}

/* 修改顶部导航栏中间按钮样式 */
.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 5px;
    width: 40px;  /* 固定宽度 */
    height: 40px; /* 固定高度 */
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-btn i {
    font-size: 18px;
}

/* 隐藏文字 */
.nav-btn span {
    display: none;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .center-controls {
        display: flex; /* 显示中间按钮 */
        gap: 10px;    /* 减小按钮间距 */
    }
    
    .nav-btn {
        width: 35px;  /* 移动端稍微缩小钮 */
        height: 35px;
    }

    .nav-btn i {
        font-size: 16px; /* 移动端稍微缩小图标 */
    }
}

/* 调整顶部导航栏整体布局 */
.center-controls {
    display: flex;
    gap: 15px;
    margin: 0 20px;
}

.top-nav {
    padding: 0 15px;
}

/* 修改搜索容器样式 */
.search-container {
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);  /* 改为半透明白色 */
    backdrop-filter: blur(20px);  /* 增加模糊程度 */
    -webkit-backdrop-filter: blur(20px);  /* Safari 支持 */
    z-index: 1004;
    transition: all 0.3s ease;
}

.search-container.active {
    top: 60px;
}

/* 搜索框样式 */
.search-box {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(47, 47, 47, 0.3);  /* 搜索框背景稍微深一点 */
    border-radius: 10px;
}

/* 搜索结果容器 */
.search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: calc(100vh - 140px);  /* 减去顶部导航和搜索框的高度 */
    overflow-y: auto;
}

/* 搜索结果中的文章卡片样式 */
.search-results .article-card {
    width: 100%;
    margin: 15px 0;
    opacity: 1;
    transform: none;
    background: rgba(47, 47, 47, 0.3);  /* 搜索结果卡片背景也改为半透明 */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.close-search {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 搜索时的背景模糊效果 */
.main-content.search-blur {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .search-box {
        padding: 10px;
    }

    .search-box input {
        padding: 10px 15px;
        font-size: 14px;
    }

    .search-results {
        padding: 0 10px;
    }
}

/* 添加未找到文章的提示样式 */
.no-results-message {
    color: #fff;
    text-align: center;
    padding: 40px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 20px auto;
    max-width: 400px;
}

/* 添加箭头按钮样式 */
.arrow-btn {
    display: none;  /* 默认隐藏 */
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 50px;
    background: rgba(47, 47, 47, 0.9);
    border-radius: 0 5px 5px 0;
    z-index: 1003;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    justify-content: center;
    align-items: center;
}

.arrow-btn::after {
    content: '>';
    color: #fff;
    font-size: 16px;  /* 减小箭头字体大小 */
    transition: transform 0.3s ease;
}

.arrow-btn.active::after {
    content: '<';
    transform: rotate(360deg); /* 添加旋转动画 */
}

/* 修改左侧介绍窗口的移动端样式 */
@media screen and (max-width: 768px) {
    .left-intro {
        position: fixed;
        left: -280px;  /* 增加宽度，相应调整初始位置 */
        width: 280px;  /* 增加宽度到280px */
        min-height: 400px; /* 设置最小高度 */
        height: 70vh;   /* 使用视口高度的70% */
        top: 50%;
        transform: translateY(-50%);
        background: rgba(47, 47, 47, 0.95);
        backdrop-filter: blur(10px);
        display: block !important;
        padding: 25px;  /* 增加内边距 */
        z-index: 1002;
        overflow-y: auto; /* 添加垂直滚动 */
        transition: all 0.3s ease;
        border-radius: 0 10px 10px 0; /* 添加右侧圆角 */
    }

    .left-intro::-webkit-scrollbar {
        width: 6px;  /* 设置滚动条宽度 */
    }

    .left-intro::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);  /* 滚动条轨道颜色 */
        border-radius: 3px;
    }

    .left-intro::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);  /* 滚动条滑块颜色 */
        border-radius: 3px;
    }

    .left-intro.active {
        left: 0;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.4);
    }

    .left-intro .default-text,
    .left-intro .hover-text {
        writing-mode: horizontal-tb;
        letter-spacing: 1px;
        line-height: 1.8;
        font-size: 15px;
    }

    .left-intro .hover-text {
        display: block;
        opacity: 1;
        margin-top: 15px;  /* 添加段落间距 */
    }
    
    /* 移除hover效果，因为移动端不需要 */
    .left-intro:hover {
        width: 280px;
    }

    .arrow-btn {
        display: flex;  /* 只在移动端显示 */
        width: 20px;     /* 移动端进一步减小宽度 */
        height: 40px;    /* 移动端减小高度 */
        background: rgba(47, 47, 47, 0.8);  /* 稍微调整透明度 */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .arrow-btn::after {
        font-size: 14px; /* 移动端减小箭头大小 */
    }

    .article-card {
        margin-left: 30px; /* 为箭头按钮留出空间 */
        width: calc(90% - 30px); /* 调整卡片宽度 */
    }

    .search-box {
        margin-left: 25px; /* 调整搜索框左边距，避免与箭头按钮重叠 */
        width: calc(100% - 25px);
    }
}

/* 修改左侧介绍窗口的移动端样式 */
@media screen and (max-width: 768px) {
    .left-intro {
        left: -200px;  /* 初始位置在屏幕外 */
        width: 200px;  /* 移动端展开宽度 */
        writing-mode: horizontal-tb;  /* 移动端使用横向文字 */
        top: 50%;
        transform: translateY(-50%);
        height: auto;
        max-height: 80vh;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .left-intro.active {
        left: 0;
    }

    .left-intro .default-text {
        writing-mode: horizontal-tb;
        letter-spacing: 1px;
    }

    .left-intro:hover {
        width: 200px;
    }

    .arrow-btn {
        display: flex;  /* 在移动端显示箭头按钮 */
        justify-content: center;
        align-items: center;
    }
}

/* 添加滚动条样式 */
.left-intro::-webkit-scrollbar {
    width: 6px;
}

.left-intro::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.left-intro::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* 全局滚动条样式 */
::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1.5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 所有区域统一使用相同的滚动条样式 */
.main-content::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar,
.left-intro::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 3px;
}

.main-content::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track,
.left-intro::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb,
.left-intro::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1.5px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 2px;
        height: 2px;
    }

    ::-webkit-scrollbar-thumb {
        border-radius: 1px;
    }
}

/* 添加内容容器样式 */
.content-wrapper {
    position: relative; /* 改为相对定位 */
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 60px; /* 为顶部导航栏留出空间 */
    background-color: #1a1a1a; /* 确保背景色一致 */
}