/* 主播页面样式 */

/* 平台筛选按钮样式 */
/* 平台筛选容器：支持换行，行/列间距一致 */
.anchor-platform-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.anchor-platform-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.3;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0;
}

.anchor-platform-btn:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.anchor-platform-btn.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.anchor-platform-btn-all {
    border-radius: 20px !important;
}

/* 平台标签内人数徽章：圆角小徽章，与按钮风格一致 */
.anchor-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    padding: 2px 8px;
    margin-left: 6px;
    font-size: 11px;
    line-height: 1;
    text-align: center;
    background: #f8f9fa;
    color: #495057;
    border-radius: 10px;
    flex-shrink: 0;
}
/* 悬停/选中时徽章保持默认样式，在绿色背景上更明显 */

/* 主播列表页样式 */
.anchor-list-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 0 20px 0;
}

body:not(.widthauto) .anchor-list-container {
    max-width: 1200px;
}

body.widthauto .anchor-list-container {
    max-width: 1920px;
}

.anchor-search-section {
    background: white;
    padding: 20px 0 20px 0;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.anchor-search-wrapper {
    position: relative;
    width: 33.333%;
    min-width: 300px;
    max-width: 600px;
}

.anchor-search-input {
    width: 100%;
    padding: 12px 10px 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    background: white;
    color: #495057;
    transition: all 0.2s ease;
}

.anchor-search-input:hover {
    border-color: #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.anchor-search-input:focus {
    outline: none;
    border-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.anchor-search-input::placeholder {
    color: #6c757d;
}

.anchor-search-icon-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anchor-search-icon-btn:hover {
    background: #f8f9fa;
    color: #495057;
    transform: translateY(-50%) scale(1.1);
}

/* 主播网格：PC（主题窄屏 1200 / 宽屏 1600）统一 6 列自适应；移动端单独列数 */
.anchor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

@media (min-width: 769px) {
    .anchor-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

.anchor-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 必须作为绝对定位头像的参照，否则 .anchor-card-bg 会相对视口定位导致整页被一张图铺满 */
.anchor-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

.anchor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.anchor-card-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.anchor-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.anchor-card-overlay {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 10px 12px;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.anchor-card .anchor-nickname {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 4px 0;
    word-break: break-word;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.anchor-card .anchor-username {
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    margin: 0 0 8px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 分页样式 */
.anchor-pagination {
    text-align: center;
    margin-top: 30px;
}

.anchor-pagination a,
.anchor-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease;
}

.anchor-pagination a:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.anchor-pagination .current {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.anchor-pagination .disabled {
    color: #6c757d;
    cursor: not-allowed;
}

/* 主播详情页样式 */
.anchor-detail-container {
    width: 100% !important;
    margin: 0 auto;
    padding: 0 0 20px 0;
}

body:not(.widthauto) .anchor-detail-container {
    max-width: 1200px !important;
}

body.widthauto .anchor-detail-container {
    max-width: 1920px !important;
}

/* 方案四：左侧偏下，头像+信息在左下，与底边留间距 */
.anchor-detail-header {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px 30px 28px 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.anchor-detail-header > * {
    position: relative;
    z-index: 2;
}

.anchor-detail-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 24px 0 0;
    flex-shrink: 0;
    object-fit: cover;
    border: 4px solid #f8f9fa;
}

.anchor-detail-info {
    margin-bottom: 0;
    text-align: left;
}

.anchor-detail-name {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.anchor-detail-id {
    font-size: 22px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.95);
    margin-left: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.anchor-detail-username {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 15px;
}

.anchor-detail-other {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.anchor-detail-platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
}

.anchor-detail-platform-icon {
    width: 20px;
    height: 20px;
}

.back-to-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.back-to-list-btn:hover {
    background: #5a6268;
    color: white;
}

/* 相关帖子区域 */
.anchor-posts-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
}

.anchor-posts-title {
    font-size: 20px;
    font-weight: bold;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

/* 插件专用类名 - 避免CSS冲突 */
.fabuba-anchor-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0;
    align-items: start;
}

.fabuba-anchor-post-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: auto;
}

.fabuba-anchor-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.fabuba-anchor-post-card-image {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.fabuba-anchor-post-card-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.fabuba-anchor-post-card-placeholder {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
}

.fabuba-anchor-post-card-content {
    padding: 15px;
    flex-shrink: 0;
    flex-grow: 0;
    flex-basis: auto;
}

.fabuba-anchor-post-title {
    font-size: 14px;
    font-weight: bold;
    color: #212529;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式设计 */
body.widthauto .fabuba-anchor-posts-grid,
body:not(.widthauto) .fabuba-anchor-posts-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

@media (min-width: 769px) {
    .fabuba-anchor-posts-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .anchor-search-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .anchor-search-input {
        min-width: auto;
    }
    
    .anchor-detail-header {
        padding: 20px;
        flex-wrap: wrap;
    }
    
    .anchor-detail-avatar {
        width: 100px;
        height: 100px;
        margin-right: 20px;
    }
    
    .fabuba-anchor-posts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .fabuba-anchor-posts-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 空状态样式 */
.anchor-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.anchor-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.anchor-empty-text {
    font-size: 16px;
    margin-bottom: 10px;
}

.anchor-empty-subtext {
    font-size: 14px;
    opacity: 0.7;
}
