/* 话题标签区域 */
.topic-tags {
    min-height: 120px;
    display: flex;
    align-items: center;
    padding: 15px 0;
}

.topic-tabs {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}


.topic-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.scroll-container-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.topic-nav-container {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow-x: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}



.topic-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    cursor: grab;
}

.topic-nav::-webkit-scrollbar {
    display: none;
}

.topic-nav:active {
    cursor: grabbing;
}

.topic-item {
    margin: 0;
    flex-shrink: 0;
}

.topic-link {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: #231815;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.topic-link:hover {
    color: #006ADB;
    background-color: rgba(0, 106, 219, 0.1);
    text-decoration: none;
}

.topic-link.active {
    color: #006ADB;
    background-color: rgba(0, 106, 219, 0.1);
    font-weight: 600;
}

.topic-more {
    margin-left: 20px;
}

.more-link {
    color: #231815;
    font-weight: 500;
    background: none;
    border: none;
    /* font-size: inherit; */
    display: flex;
    align-items: center;
}

.more-link:hover {
    color: #006ADB;
    text-decoration: none;
}

.more-span {
    padding: 8px 0;
    text-decoration: none;
}


/* Tags部分 */
.tags-section {
    min-height: 60px;
    padding: 15px 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.tags-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: visible; /* 确保滚动按钮可以超出显示 */
}

.tabs-list {
    overflow: visible; /* 确保滚动按钮可以超出显示 */
}

.tags-scroll-container-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: visible; /* 确保滚动按钮可以超出显示 */
}

.tags-wrapper-container {
    flex: 1;
    min-width: 0;
    display: flex;
    white-space: nowrap;
    overflow-x: auto;
    gap: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    cursor: grab;
}

.tags-wrapper-container::-webkit-scrollbar {
    display: none;
}

.tags-wrapper-container:active {
    cursor: grabbing;
}



.tags-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    cursor: grab;
}

.tags-wrapper::-webkit-scrollbar {
    display: none;
}

.tags-wrapper:active {
    cursor: grabbing;
}

.tags-search {
    margin-left: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.search-wrapper {
    display: flex;
    width: 200px;
    border: none;
    border-radius: 5px;
    background-color: #f1f3f4;
    transition: background-color 0.15s ease-in-out;
    overflow: hidden;
}

.search-wrapper:focus-within {
    background-color: #e8eaed;
}

.search-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    color: #9aa0a6;
}

.search-input-custom {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 12px 8px 0;
    font-size: 14px;
    background: transparent;
    color: #3c4043;
}

.search-input-custom::placeholder {
    color: #9aa0a6;
    font-size: 14px;
}



.search-input-bootstrap::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.tag-item {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    color: #6c757d;
    background-color: white;
    flex-shrink: 0;
    white-space: nowrap;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.tag-item:hover {
    border-color: #006ADB;
    color: #006ADB;
}

.tag-item:focus {
    outline: none;
}

.tag-item:active {
    transform: scale(0.98);
}

.tag-item.tag-active {
    background-color: #E3F2FD;
    border-color: #006ADB;
    color: #006ADB;
}

.tag-item.tag-active:hover {
    background-color: #BBDEFB;
    border-color: #0056B3;
    color: #0056B3;
}

.tag-item.tag-active:focus {
    background-color: #E3F2FD;
    border-color: #006ADB;
    color: #006ADB;
}

/* 移动设备特殊处理 */
@media (hover: none) and (pointer: coarse) {
    .tag-item:hover {
        border-color: #dee2e6;
        color: #6c757d;
    }

    .tag-item:not(.tag-active):focus {
        border-color: #dee2e6;
        color: #6c757d;
        background-color: white;
    }
}

/* 响应式设计 */

/* 超大屏幕 (大桌面) */
@media (min-width: 1400px) {
    .topic-tags {
        min-height: 130px;
    }

    .search-wrapper {
        width: 260px;
    }

    .topic-link {
        padding: 9px 18px;
        font-size: 15px;
    }

    .tag-item {
        padding: 7px 14px;
        font-size: 15px;
    }
}

/* 大屏幕 (桌面) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .topic-tags {
        min-height: 125px;
    }

    .search-wrapper {
        width: 240px;
    }

    .topic-link {
        padding: 8px 16px;
        font-size: 14px;
    }

    .tag-item {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* 中等屏幕 (小桌面/大平板) */
@media (min-width: 992px) and (max-width: 1199px) {
    .topic-tags {
        min-height: 120px;
    }

    .search-wrapper {
        width: 180px;
    }

    .topic-nav {
        gap: 8px;
    }

    .topic-link {
        padding: 7px 14px;
        font-size: 13px;
    }

    .tag-item {
        font-size: 13px;
        padding: 6px 11px;
    }
}

/* 平板设备 (iPad等) */
@media (min-width: 769px) and (max-width: 991px) {
    .topic-tags {
        min-height: 115px;
    }

    .topic-nav {
        gap: 7px;
    }

    .topic-link {
        font-size: 12px;
        padding: 6px 12px;
    }



    .tags-section {
        min-height: 55px;
        padding: 12px 0;
    }

    .tags-wrapper {
        gap: 7px;
    }

    .tag-item {
        font-size: 12px;
        padding: 5px 10px;
    }

    .search-wrapper {
        width: 160px;
    }

    .search-input-custom {
        font-size: 13px;
        padding: 8px 10px 8px 0;
    }
}

/* 小平板/大手机 (横屏) */
@media (min-width: 577px) and (max-width: 768px) {
    .topic-tags {
        min-height: 110px;
    }

    .topic-nav {
        gap: 6px;
    }

    .topic-link {
        font-size: 11px;
        padding: 5px 10px;
    }



    .tags-section {
        min-height: 50px;
        padding: 10px 0;
    }

    .tags-wrapper {
        gap: 6px;
    }

    .tag-item {
        font-size: 11px;
        padding: 4px 8px;
    }

    .search-wrapper {
        width: 140px;
    }

    .search-input-custom {
        font-size: 12px;
        padding: 7px 8px 7px 0;
    }

    .search-icon-wrapper {
        padding: 0 8px;
    }
}

/* 手机设备 (竖屏) */
@media (max-width: 576px) {
    .topic-tags {
        min-height: 105px;
        padding: 10px 0;
    }

    .topic-nav {
        gap: 4px;
    }

    .topic-link {
        font-size: 10px;
        padding: 4px 8px;
        letter-spacing: 0.2px;
    }



    .tags-section {
        min-height: 45px;
        padding: 10px 0;
    }

    .tags-wrapper {
        gap: 4px;
    }

    .tag-item {
        font-size: 10px;
        padding: 3px 6px;
    }

    .search-wrapper {
        width: 120px;
        border-radius: 15px;
    }

    .search-input-custom {
        font-size: 11px;
        padding: 6px 6px 6px 0;
    }

    .search-icon-wrapper {
        padding: 0 6px;
    }

    .topic-more {
        margin-left: 6px;
    }

    .tags-search {
        margin-left: 6px;
    }
}

/* 超小屏幕 (小手机) */
@media (max-width: 375px) {
    .topic-tags {
        min-height: 100px;
        padding: 8px 0;
    }

    .topic-nav {
        gap: 3px;
    }

    .topic-link {
        font-size: 9px;
        padding: 3px 6px;
        letter-spacing: 0.1px;
    }

    .tags-section {
        min-height: 40px;
        padding: 8px 0;
    }

    .tags-wrapper {
        gap: 3px;
    }

    .tag-item {
        font-size: 9px;
        padding: 2px 5px;
    }

    .search-wrapper {
        width: 100px;
        border-radius: 12px;
    }

    .search-input-custom {
        font-size: 10px;
        padding: 5px 4px 5px 0;
    }

    .search-icon-wrapper {
        padding: 0 5px;
    }

    .topic-more {
        margin-left: 6px;
    }

    .tags-search {
        margin-left: 6px;
    }
}


/* 重写icon的样式 */
.bi-chevron-down::before {
    font-weight: 700 !important;
}
/* 推荐内容区域样式 */
.recommend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    align-items: center;
}

.filter-btn {
    padding: 5px 10px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: all 0.2s ease;
    position: relative;
    font-weight: normal;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* 最后一个.filter-btn */
.filter-btn:last-child {
    padding-right: 0;
}

.filter-btn.active {
    color: #2864e8;
}

.filter-btn:hover:not(.active) {
    color: #666;
}

.recommend-divider {
    border: none;
    height: 1px;
    background-color: #dee2e6;
    margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .recommend-filters {
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        text-align: center;
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 576px) {
    .recommend-title h2 {
        font-size: 18px;
    }
    
    .filter-btn {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* 为新的话题与标签结构添加样式 */
.topic-nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.tags-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.recommend-tab {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: center;
}

.recommend-tab.active {
    font-weight: 600;
}

.tabs-list .tabs-item {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
    margin-right: 0px;
}

.tabs-list .tabs-item.active {
    color: #006ADB;
    background-color: rgba(0, 106, 219, 0.1);
    font-weight: 600;
    border-radius: 4px;
}

/* 响应式设计 - 小屏幕适配 */
@media (max-width: 768px) {
    .topic-nav-wrapper {
        flex-wrap: wrap;
        gap: 10px;
    }

    .scroll-container-wrapper {
        flex: 1;
        min-width: 0;
        order: 1;
    }

    .topic-more {
        margin-left: 0;
        order: 2;
        flex-shrink: 0;
    }

    .topic-nav-container {
        gap: 8px;
    }

    .recommend-tab {
        font-size: 13px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .topic-nav-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .scroll-container-wrapper {
        order: 1;
        flex: 1;
        min-width: 0;
    }

    .topic-more {
        order: 2;
        flex-shrink: 0;
        margin-left: 8px;
    }

    .topic-nav-container {
        gap: 6px;
    }

    .recommend-tab {
        font-size: 12px;
        padding: 6px 10px;
    }
}