/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 主容器 */
.container {
    height: 100vh;
    background: #F7F8FA;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100vh;
}

/* 左侧侧边栏 */
.left-sidebar {
    width: 224px;
    background: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
    transition: width 0.3s ease;
}

.logo-area {
    height: 80px;
    border-bottom: 1px solid #f2f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.logo-full, .logo-mini {
    position: absolute;
    opacity: 1;
    transition: opacity 0.3s ease;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-mini {
    opacity: 0;
}

.logo-text {
    font-weight: bold;
    font-size: 18px;
    opacity: 1;
    transition: opacity 0.3s ease, width 0.3s ease;
    width: auto;
    overflow: hidden;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
}

.content-inner {
    min-height: 710px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 细滚动条样式 */
.content-wrapper::-webkit-scrollbar {
    width: 4px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.content-wrapper::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 2px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.menu-area {
    padding: 16px;
    flex: 1;
}

.menu-link {
    display: block;
}

.menu-item {
    height: 56px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding-left: 24px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
}

.menu-item:hover {
    background: #f2f3f5;
}

.menu-item.active {
    background: #f2f3f5;
}

.menu-icon {
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin-right: 16px;
    margin-top: 3px;
}

.menu-icon.icon-jxtj {
    background-image: url('../img/jxtj.svg');
}

.menu-item.active .menu-icon.icon-jxtj{
    background-image: url('../img/jxtj2.svg');
}

.menu-icon.icon-lmfx {
    background-image: url('../img/lmfx.svg');
}

.menu-item.active .menu-icon.icon-lmfx {
    background-image: url('../img/lmfx2.svg');
}

.menu-icon.icon-sjtj {
    background-image: url('../img/sjtj.svg');
}

.menu-item.active .menu-icon.icon-sjtj{
    background-image: url('../img/sjtj2.svg');
}

.menu-icon.icon-zjgx {
    background-image: url('../img/zjgx.svg');
}

.menu-item.active .menu-icon.icon-zjgx{
    background-image: url('../img/zjgx2.svg');
}

.menu-icon.icon-nrsq {
    background-image: url('../img/lrsq.svg');
}

.menu-icon.icon-xmpt {
    background-image: url('../img/xmpt.svg');
}

.menu-text {
    color: #4E5969;
    font-size: 16px;
    opacity: 1;
    transition: opacity 0.3s ease, width 0.3s ease;
    width: auto;
    overflow: hidden;
    white-space: nowrap;
}

.menu-item.active .menu-text {
    color: #1D2129;
}

.divider {
    height: 1px;
    background: #d0d0d0;
    margin: 8px 0;
}

.menu-image-placeholder {
    width: 192px;
    height: 68px;
    margin: 16px auto 0;
}

.menu-image-placeholder img {
    width: 100%;
    height: 100%;
    display: block;
}

.bottom-wrapper {
    margin-top: auto;
}

.bottom-area {
    padding: 16px;
}

.home-button {
    width: 192px;
    height: 36px;
    border: 1px solid #e4e1ef;
    border-radius: 8px;
    background: white;
    color: #1D2129;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto;
}

.community-link {
    display: block;
    width: 192px;
    margin: 0 auto;
}

.community-button {
    width: 192px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #F7F8FA;
    color: #86909C;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 8px;
}

.user-info-area {
    width: 100%;
    height: 88px;
    border-top: 1px solid #f2f3f5;
    padding: 0 16px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #ccc;
    border-radius: 50%;
    background: url('../img/tx.png') no-repeat;
    background-size: 100% 100%;
}

.user-name {
    color: #1D2129;
    font-size: 14px;
    opacity: 1;
    transition: opacity 0.3s ease, width 0.3s ease;
    width: auto;
    overflow: hidden;
    white-space: nowrap;
}

.user-icon-right {
    width: 20px;
    height: 20px;
    background: url('../img/folding.svg') no-repeat;
    cursor: pointer;
    &.user-icon-right2 {
        background: url('../img/folding2.svg') no-repeat;
        margin-left: 6px;
        display: none;
    }
    background-size: 100% 100%;
}

/* 主内容区域包裹器 */
.main-area-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
}

.main-area-wrapper::-webkit-scrollbar {
    width: 6px;
}

.main-area-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.main-area-wrapper::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.main-area-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 主内容区域 */
.main-area {
    max-width: 1480px;
    margin: 0 auto;
    padding: 32px 20px;
}

.banner-area {
    width: 100%;
    margin-bottom: 20px;
}

.banner-image {
    width: 100%;
    display: block;
}

.search-section {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo2 {
    flex-shrink: 0;
}

.search-wrapper {
    flex: 1;
    max-width: 887px;
    height: 64px;
    background: white;
    border-radius: 32px;
    display: flex;
    align-items: center;
    padding: 0 10px 0 32px;
    position: relative;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #1D2129;
}

.search-input::placeholder {
    color: #98A2B3;
    font-size: 16px;
}

.search-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FF7E00;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* 搜索结果样式 */
.search-results {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e6eb;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f2f3f5;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: #f7f8fa;
}

.search-result-item .result-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-result-item .result-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.search-result-item .result-info {
    flex: 1;
}

.search-result-item .result-info .result-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1D2129;
    margin-bottom: 4px;
}
.result-highlight {
    font-size: 0.75rem;
    color: #666666;
}
.search-loading {
    text-align: center;
    margin: 40px;
    color: #ccc;
}
.search-result-item .result-info .result-subtitle {
    font-size: 12px;
    color: #86909C;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #86909C;
    font-size: 14px;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 精选推荐区域 */
.featured-section {
    margin-top: 48px;
    scroll-margin-top: 100px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    margin-top: 3px;
}

.title-icon.icon-jxtj {
    background-image: url('../img/jxtj.svg');
}

.title-icon.icon-lmfl {
    background-image: url('../img/lmfx.svg');
}

.title-icon.icon-zjgx-title {
    background-image: url('../img/zjgx.svg');
}

.title-text {
    color: #1D2129;
    font-size: 20px;
    font-weight: 500;
}

.cards-container {
    margin-top: 16px;
    width: 100%;
    height: 372px;
    border: 1px solid #e5e6eb;
    border-radius: 10px;
    padding: 10px 10px 3px 10px;
    position: relative;
    background: white;
}

.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #70757A;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    color: white;
}

.scroll-button.scroll-left {
    left: -16px;
}

.scroll-button.scroll-right {
    right: -16px;
}

.scroll-button:hover {
    background: #5a5f64;
}

.cards-wrapper {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 16px;
    scroll-behavior: smooth;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cards-wrapper::-webkit-scrollbar {
    height: 6px;
}

.cards-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.cards-wrapper::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}

.cards-wrapper:hover::-webkit-scrollbar-thumb {
    background: #d0d0d0;
}

.cards-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

.card {
    flex-shrink: 0;
    width: 262px;
    background: #f4f6f8;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.card-image {
    width: 100%;
    height: 136px;
    border-radius: 6px;
    background-size: 100% 100%;
    background-position: center;
    background-color: #e0e0e0;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.card-title {
    margin-top: 16px;
    font-size: 16px;
    color: #1D2129;
    font-weight: 500;
    line-height: 24px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
#cardsWrapper .card {
    cursor: pointer;
}
.card-description {
    margin-top: 8px;
    font-size: 14px;
    color: #86909C;
    line-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

/* 栏目分类区域 */
.category-section {
    margin-top: 54px;
    scroll-margin-top: 100px;
}

.tab-container {
    margin-top: 24px;
    display: flex;
    background: #F2F3F5;
    height: 56px;
    border-radius: 10px;
    width: 100%;
    max-width: 1112px;
    margin-left: auto;
    margin-right: auto;
}

.tab-button {
    width: 25%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button.active {
    background: white;
    border-radius: 10px;
}

.tab-icon {
    width: 24px;
    height: 24px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tab-icon.icon-jcqb {
    background-image: url('../img/jcqb.png');
}

.tab-button.active .tab-icon.icon-jcqb {
    background-image: url('../img/jcqb2.png');
}

.tab-icon.icon-syjj {
    background-image: url('../img/syjj.png');
}

.tab-button.active .tab-icon.icon-syjj {
    background-image: url('../img/syjj2.png');
}

.tab-icon.icon-alsc {
    background-image: url('../img/alsc.png');
}

.tab-button.active .tab-icon.icon-alsc {
    background-image: url('../img/alsc2.png');
}

.tab-icon.icon-sygj {
    background-image: url('../img/sygj.png');
}

.tab-button.active .tab-icon.icon-sygj {
    background-image: url('../img/sygj2.png');
}

.tab-text {
    margin-left: 16px;
    font-size: 16px;
    color: #121515;
}

.tab-button.active .tab-text {
    color: #1D2129;
}

.category-cards-grid {
    margin-top: 24px;
}

.category-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-card {
    border: 1px solid #E5E6EB;
    border-radius: 10px;
    background: white;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-card:hover {
    box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
}

.category-card-image {
    width: 100%;
    max-height: 148px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    border-radius: 6px;
}

.category-card-title {
    margin-top: 20px;
    font-size: 16px;
    color: #1D2129;
    line-height: 26px;
    font-weight: 500;
}

.category-card-description {
    margin-top: 12px;
    font-size: 14px;
    color: #86909C;
    line-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 最近更新区域 */
.recent-section {
    margin-top: 56px;
    scroll-margin-top: 100px;
}

.recent-cards-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-card {
    width: 100%;
    height: 70px;
    border: 1px solid #E5E6EB;
    border-radius: 10px;
    background: white;
    padding: 0 28px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recent-card:hover {
    border-color: #C9CDD4;
}

.recent-card-title {
    font-size: 16px;
    color: #1D2129;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.recent-card-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.recent-card-tags {
    display: flex;
    gap: 8px;
}

.recent-card-tag {
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    font-size: 12px;
}

/* 标签样式 */
.tag-xiaohongshu {
    background: #F2F3F5;
    color: #1D2129;
}

.tag-zhihu {
    background: #E8F7FF;
    color: #3491FA;
}

.tag-douyin {
    background: #F5E8FF;
    color: #722ED1;
}

.tag-gongzhonghao {
    background: #FFFCE8;
    color: #F7BA1E;
}

.tag-shipinhao {
    background: #FFF3E8;
    color: #F77234;
}

.recent-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}

.recent-card-author {
    font-size: 14px;
    color: #86909C;
    min-width: 100px;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-card-time {
    font-size: 14px;
    color: #86909C;
}

/* 侧边栏折叠状态样式 */
.left-sidebar.collapsed {
    width: 88px;
}

.left-sidebar.collapsed .logo-area {
    padding: 0;
}

.left-sidebar.collapsed .logo-full {
    opacity: 0;
}

.left-sidebar.collapsed .logo-mini {
    opacity: 1;
}

.left-sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.left-sidebar.collapsed .menu-item {
    padding-left: 16px;
    justify-content: center;
}

.left-sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.left-sidebar.collapsed .menu-image-placeholder {
    display: none;
}

.left-sidebar.collapsed .bottom-area {
    padding: 16px 0;
}

.left-sidebar.collapsed .home-button,
.left-sidebar.collapsed .community-link,
.left-sidebar.collapsed .community-button {
    width: 56px;
    font-size: 12px;
}

.left-sidebar.collapsed .user-info-left {
    gap: 0;
    justify-content: center;
    flex: 1;
}

.left-sidebar.collapsed .user-name {
    opacity: 0;
    width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.left-sidebar.collapsed .user-icon-right {
    display: none;
}

/* 移动端适配 */
@media (max-width: 1200px) {
    .category-group {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 800px) {
    .category-group {
        grid-template-columns: repeat(2, 1fr);
    }
    .tab-icon {
        display: none;
    }
    .tab-text {
        margin-left: 0;
    }
}

@media (max-width: 630px) {
    .search-section {
        flex-wrap: wrap;
    }
}
@media (max-width: 1024px) {
    .recent-card-info {
        display: none;
    }
    .menu-item {
        height: 52px;
    }
    .menu-icon {
        margin-top: 0;
    }
    .logo2 {
        max-width: 60%;
    }
    .category-card-title {
        margin-top: 10px;
    }
    .category-card-description {
        margin-top: 6px;
    }
}
@media (max-width: 750px) {
    .user-icon-right2 {
        display: none !important;
    }
    .main-area {
        padding: .5rem;
    }
    .search-input::placeholder {
        font-size: 12px;
    }
    .banner-area {
        margin-bottom: 0;
    }
    .search-section {
        margin-top: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .search-wrapper {
        max-width: 100%;
        width: 100%;
        padding-left: 12px;
    }
    .search-input {
        width: calc(100% - 50px);
    }
    .category-section {
        margin-top: 2em;
    }
    .tab-text {
        font-size: .75rem;
    }
    .category-group {
        grid-template-columns: repeat(1, 1fr);
        gap: .5rem;
    }
    .recent-card {
        padding: 0 .8em;
        height: 3rem;
    }
    .recent-card {
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        .recent-card-title,  .recent-card-title span {
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }
    }
    .recent-card-title {
        font-size: .8rem;
    }
    .recent-section {
        margin-top: 2rem;
    }
    .search-button {
        margin: 10px 0;
        width: 30px;
        height: 30px;
    }
    .featured-section {
        margin-top: 2rem;
    }
    .tab-container {
        margin-top: 1rem;
    }
    .category-cards-grid {
        margin-top: .5rem;
    }
    .category-card-title {
        margin-top: .3rem;
    }
    .category-card-description {
        margin-top: .1rem;
    }
    .left-sidebar.collapsed {
        width: 58px !important;
    }
    .menu-area {
        padding: 4px;
    }
    .menu-item {
        height: 46px;
        padding-left: 0 !important;
    }
    .menu-icon {
        margin-right: 0;
    }
    .logo-area img {
        width: 80%;        
    }
    .content-inner {
        min-height: auto;
    }
    .user-info-area {
        padding: 1rem 0;
        height: auto;
    }
    .left-sidebar.collapsed .home-button, .left-sidebar.collapsed .community-link, .left-sidebar.collapsed .community-button {
        width: auto;
    }
    .left-sidebar.collapsed .bottom-area {
        width: 80%;
        margin: auto;
    }
    .recent-cards-list {
        margin-top: 1rem;
    }
    .scroll-button.scroll-left {
        left: -.4rem;
    }
    .scroll-button.scroll-right {
        right: -.4rem;
    }
    #cardsWrapper .card {
        width: 80%;
    }
}