/* 横幅插图区域样式 */
.banner-section {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #005EA4; /* 添加默认背景色 */
}

/* 隐藏原来的图片元素 */
.banner-image {
    display: none;
}

.banner-img {
    display: none;
}

/* 响应式设计 */
@media (max-width: 608px) {
    .banner-section {
        height: 400px;
    }
}

/* 移动端适配 - 横幅区域在极小屏幕上的优化 */
@media (max-width: 480px) {
    .banner-section {
        height: 300px;
    }
}

/* 栏目标签栏样式 */
.category-tabs-container {
    margin: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.category-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
}

.category-tab:hover {
    color: #0071e3;
    background-color: rgba(0, 113, 227, 0.05);
}

.category-tab.active {
    color: #0071e3;
    border-bottom-color: #0071e3;
    background-color: rgba(0, 113, 227, 0.08);
}

.category-tab:focus {
    outline: none;
    background-color: rgba(0, 113, 227, 0.1);
}

/* 最新主题缩略图区域 */
.latest-topics-thumbnails {
    background: #fff;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    padding: 10px;
    margin-top: 0;
    flex: 1;
}

.latest-topics-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.thumbnails-container {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.thumbnail-item {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    max-width: calc(33.333% - 10px);
}

.thumbnail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.thumbnail-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.thumbnail-content {
    padding: 12px;
    background: #fff;
}

.thumbnail-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.thumbnail-meta {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.thumbnail-author {
    font-weight: 500;
}

.thumbnail-date {
    color: #999;
}

.carousel-container {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 6px 6px 6px 6px;
    margin-top: 10px;
}

.carousel-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    color: white;
}

.carousel-slide-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.carousel-slide-meta {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 轮播导航按钮 */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    margin-top: 10px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.topics-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 0.9rem;
    table-layout: fixed;
    margin: 0;
}

.topics-table th,
.topics-table td {
    padding: 0.7rem 0.9rem; /* 减小内边距 */
    text-align: left;
    border-bottom: 1px solid #f1f2f3;
    height: 3rem;
    line-height: 1.8; /* 稍微减小行高 */
}

.topics-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.topics-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.topics-table tbody tr:hover {
    background-color: #f0f8ff;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.topics-table th {
    background-color: #edf0f1;
    font-weight: 600; 
    color: #53595f;
    font-size: 0.7rem; /* 根据用户偏好设置 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.4rem 0.6rem; /* 减小表头内边距 */
}

.topics-table th:first-child,
.topics-table td:first-child {
    width: 60px; /* 浏览数列宽度 */
    text-align: center;
    padding: 0.3rem 0.5rem; /* 进一步减小内边距 */
}

.topics-table th:nth-child(2),
.topics-table td:nth-child(2) {
    width: 68%; /* 主题标题列宽度，占据最大空间 */
    padding: 0.3rem 0.5rem; /* 减小内边距 */
}

.topics-table th:nth-child(3),
.topics-table td:nth-child(3) {
    width: 80px; /* 字数/回复数列宽度 */
    padding: 0.3rem 0.5rem; /* 减小内边距 */
}

.topics-table th:nth-child(4),
.topics-table td:nth-child(4) {
    width: 100px; /* 作者列宽度 */
    padding: 0.3rem 0.5rem; /* 减小内边距 */
}

.topics-table th:nth-child(5),
.topics-table td:nth-child(5) {
    width: 120px; /* 最后回复时间列宽度 */
    padding: 0.3rem 0.5rem; /* 减小内边距 */
}

.topics-table th:nth-child(6),
.topics-table td:nth-child(6) {
    padding: 0.3rem 0.5rem; /* 减小内边距 */
    /* 移除字体大小设置，使用与作者列相同的样式 */
}

.topics-table .topic-title {
    color: var(--color-dark);
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    flex: 1;
}



.topics-table td:nth-child(2) {
    width: 40%; /* 增加主题列宽度 */
    max-width: none;
}

.topics-table .topic-title-bold {
    font-weight: bold;
}

.topics-table .topic-title-hidden {
    color: var(--color-gray);
}

.topics-table .topic-title:hover {
    text-decoration: none;
}

/* 表格单元格内的文字溢出处理 */
.topics-table th,
.topics-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 主题标题单元格的特殊处理 */
.topics-table td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    width: 100%;
}

.topics-table td:nth-child(2) a {
    display: inline-block;
    vertical-align: middle;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
    padding-right: 20px;
    box-sizing: border-box;
}

.topics-table td:nth-child(2) .pinned-icon,
.topics-table td:nth-child(2) .new-icon {
    flex-shrink: 0;
}

.pinned-icon {
    font-weight: bold;
    font-size: 0.65rem;
    background-color: #ff7f00; /* 橘红色 */
    color: white;
    padding: 0.2rem 0.2rem;
    border-radius: 4px;
    margin-right: 3px;
    vertical-align: middle;
}



.new-icon {
    font-weight: bold;
    font-size: 0.65rem;
    background-color: #27ae60; /* 绿色 */
    color: white;
    padding: 0.2rem 0.2rem;
    border-radius: 4px;
    margin-right:3px;
    vertical-align: middle;
}

.special-indicator {
    color: var(--color-danger);
    margin-right: 5px;
    font-weight: normal;
    font-size: 0.9rem;
}

.topics-table .username,
.topics-table .reply-count,
.topics-table .view-count,
.topics-table .last-reply {
    color: var(--color-secondary);
    font-size: 0.8rem; /* 与作者列相同的字体大小 */
}

@media (max-width: 800px) {
    .carousel-container {
        height: 300px;
    }
    
    .carousel-slide-title {
        font-size: 1rem;
    }
    
    .carousel-slide-meta {
        font-size: 0.8rem;
    }
    
    /* 分类标签在手机端的优化 */
    .category-tab {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* 搜索框在手机端的优化 */
    .unified-search-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    #categoryFilter.form-control,
    #searchInput.form-control {
        width: 100%;
        margin-bottom: 5px;
    }
    
    /* 搜索按钮在手机端的优化 */
    .btn--primary {
        width: 100%;
        margin-bottom: 5px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* 论坛控制区域在手机端的优化 */
    .forum-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 1px auto;
    }
    
    /* 首页按钮尺寸优化 - 根据用户偏好 */
    .btn--sm {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* 表格最后回复列优化 - 根据用户偏好 */
    .topics-table .last-reply {
        font-size: 0.6rem;
    }
    
    /* 移动端确保主题列表区域可见 */
    .topics-list-area {
        min-height: auto;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

/* 移动端适配 - 搜索区域在极小屏幕上的优化 */
@media (max-width: 480px) {
    /* 确保主题列表区域可见 */
    #forumHomeSection {
        display: block !important;
    }
    
    .topics-list-area {
        display: block !important;
    }
    .forum-controls {
        padding: 0 10px;
    }
    
    .unified-search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .search-input-container,
    .unified-search-bar > div {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-container input,
    .unified-search-bar select {
        width: 100%;
        margin-top: 5px;
    }
    
    .search-buttons-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn--primary {
        width: 100%;
        padding: 0.6rem;
        font-size: 1rem;
    }
    
    /* 轮播图在极小屏幕上的优化 */
    .carousel-container {
        height: 250px;
    }
    
    .carousel-slide-title {
        font-size: 0.9rem;
    }
    
    .carousel-slide-meta {
        font-size: 0.75rem;
    }
    
    /* 分类标签在极小屏幕上的优化 */
    .category-tab {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    /* 表格在极小屏幕上的优化 */
    .topics-table th,
    .topics-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .topics-table th:first-child,
    .topics-table td:first-child {
        width: 50px;
        padding: 0.3rem;
    }
    
    .topics-table th:nth-child(2),
    .topics-table td:nth-child(2) {
        width: auto;
        padding: 0.3rem;
    }
    
    .topics-table th:nth-child(3),
    .topics-table td:nth-child(3) {
        width: 60px;
        padding: 0.3rem;
    }
    
    .topics-table th:nth-child(4),
    .topics-table td:nth-child(4) {
        width: 80px;
        padding: 0.3rem;
    }
    
    .topics-table th:nth-child(5),
    .topics-table td:nth-child(5) {
        width: 100px;
        padding: 0.3rem;
    }
    
    /* 缩略图在极小屏幕上的优化 */
    .thumbnails-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .thumbnail-item {
        max-width: 100%;
    }
    
    .thumbnail-image {
        height: 100px;
    }
    
    .thumbnail-title {
        font-size: 0.85rem;
    }
    
    .thumbnail-meta {
        font-size: 0.75rem;
    }
    
    /* 确保主题列表区域在极小屏幕上可见 */
    .topics-list-area {
        min-height: auto;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    /* 确保主题列表区域可见 */
    #forumHomeSection {
        display: block !important;
    }
    
    .topics-list-area {
        display: block !important;
    }
}