/* 原网站的布局控制样式 - 直接复制 */
.customize-width {
    max-width: 1900px;
}

.sidebar-nav {
    width: 220px;
}

@media (min-width: 768px) {
    .main-content {
        margin-left: 220px;
    }
    
    .main-content .page-header {
        left: 220px;
    }
}

.category-content-area {
    padding: 20px 0;
}

.category-section {
    scroll-margin-top: 80px; /* 为固定header留出空间 */
    padding-left: 20px; /* 增加左边距，让分类标题离左侧边界有适当距离 */
}

.category-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.category-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: #3498db;
}

.subcategory-section {
    margin-top: 30px;
    padding-left: 20px;
    border-left: 3px solid #3498db;
}

.subcategory-title {
    color: #34495e;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
}

/* 右侧内容区域样式 - 复制原网站ai-bio.cn样式 */
.sidebar-right {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-right .card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: #fff;
}

.sidebar-right .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

.sidebar-right .card-header h5 {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-right .card-body a {
    color: #6c757d;
    transition: color 0.2s ease;
}

.sidebar-right .card-body a:hover {
    color: #007bff;
    text-decoration: none;
}

.sidebar-right .list-group-item {
    background-color: transparent;
    border: none !important;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s ease;
}

.sidebar-right .list-group-item:hover {
    background-color: #f8f9fa;
}

.sidebar-right .list-group-item span {
    font-size: 13px;
    color: #495057;
    transition: color 0.2s ease;
}

.sidebar-right .list-group-item:hover span {
    color: #007bff;
}

.sidebar-right .list-group-item i {
    color: #6c757d;
    font-size: 14px;
    transition: color 0.2s ease;
}

.sidebar-right .list-group-item:hover i {
    color: #007bff;
}

.sidebar-right .text-sm {
    font-size: 0.8rem;
}

/* 响应式设计 - 在小屏幕上隐藏右侧栏 */
@media (max-width: 991.98px) {
    .sidebar-right {
        display: none !important;
    }
}

/* 原网站的滑动菜单样式 - 直接复制 */
.slider_menu[sliderTab] {
    position: relative;
    background: rgba(0,0,0,.1);
    border-radius: 50px;
    border: 3px solid transparent;
    overflow: hidden;
    -webkit-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
}

.slider_menu[sliderTab] > .menu {
    position: relative;
    white-space: nowrap;
    flex-wrap: initial;
}

.slider_menu[sliderTab] .anchor {
    background: #5961f9;
    border-radius: 100px;
    width: 60px;
    height: 40px;
    opacity: 0;
    -webkit-transition: .35s;
    transition: .35s;
}

.slider_menu[sliderTab] > .menu > li {
    cursor: pointer;
    width: auto;
    height: auto;
}

.slider_menu[sliderTab] > .menu > li > a {
    display: block;
    text-decoration: none;
    position: relative;
    color: #888;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 14px;
    padding: 0 16px;
    -webkit-transition: .25s;
    transition: .25s;
}

.slider_menu[sliderTab] > .menu > li > a:hover {
    color: #fff;
}

.slider_menu[sliderTab] > .menu > li > a.active {
    color: #fff;
}

.slider_menu[sliderTab] ul:hover li:not(.hover) a.active {
    color: #888 !important;
}

.slider_menu.mini_tab[sliderTab] > .menu > li > a {
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
}

/* Bootstrap nav-pills 样式覆盖 - 保留紫色背景 */
.nav-pills.menu .nav-link.active,
.nav-pills.menu .show > .nav-link {
    color: #fff !important;
    background-color: #5961f9 !important;
    box-shadow: 0px 5px 20px -3px rgba(89,97,249,.6) !important;
}

/* 关键规则：hover时让非hover的active状态变灰 - 直接复制原网站 */
.slider_menu[sliderTab] ul:hover li:not(.hover) a.active {
    color: #888 !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* 原网站的主题色样式 */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff !important;
    background-color: #5961f9;
    box-shadow: 0px 5px 20px -3px rgba(89,97,249,.6);
}

/* 原网站的tab-widget-nav样式 - AI快讯、AI教程、AI百科按钮 */
.tab-widget-nav .nav-pills .nav-link:hover {
    background-color: rgba(132,132,132,.2) !important;
    color: inherit !important;
    box-shadow: none !important;
}

.tab-widget-nav .nav-pills .nav-link.active {
    color: #5961f9 !important;
    background-color: rgba(132,132,132,.2) !important;
    box-shadow: none !important;
}

.nav-pills .nav-link:hover {
    color: #5961f9;
}

/* 横向滚动样式 */
.tab-auto-scrollbar {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.tab-auto-scrollbar::-webkit-scrollbar {
    display: none;
}

/* 分类内容区域默认显示，tab内容默认隐藏 */
.category-content-area {
    display: block;
}

.tab-content {
    display: block;
}

.tab-pane {
    display: none;
}

.tab-pane.active.show {
    display: block;
}

/* 页面布局修复 - 确保内容和页脚不重叠 */
#content {
    margin-bottom: 4rem;
}

.footer {
    margin-top: 3rem;
    clear: both;
}

/* 确保右侧边栏在小屏幕上不显示 */
@media (max-width: 991.98px) {
    .sidebar-right {
        display: none !important;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .category-section {
        scroll-margin-top: 60px;
        padding-left: 15px; /* 移动设备上的左边距 */
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .subcategory-section {
        padding-left: 15px;
    }
    
    #content {
        margin-bottom: 2rem;
    }
}
