/**
 * 公共页面样式表
 * 用于未登录用户访问的公共页面（社区、作品展示等）
 */

/* ==================== 瀑布流布局 ==================== */
.waterfall-container {
    /* 瀑布流容器：由 JS 控制列布局 */
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    /* 确保容器可以正确计算高度 */
    min-height: 100px;
}

.waterfall-item {
    position: absolute;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.waterfall-item.is-visible {
    opacity: 1;
    visibility: visible;
}

.waterfall-item:hover {
    box-shadow: none;
}

.waterfall-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

.waterfall-item-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 10px 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}

.waterfall-item:hover .waterfall-item-info {
    transform: translateY(0);
    opacity: 1;
}

.waterfall-item-title {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.waterfall-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.82);
}

.waterfall-item-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.waterfall-item-author span {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 头像统一样式 */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
}

.avatar-sm {
    width: 18px;
    height: 18px;
}

.waterfall-item-author .avatar {
    width: 18px;
    height: 18px;
    margin-right: 4px;
}

.waterfall-item-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.waterfall-item-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.waterfall-item-stat img {
    width: 14px;
    height: 14px;
    filter: brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(85%);
}

/* 视频播放图标 - 纯圆形播放按钮，无背景 */
.waterfall-item-play-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
    pointer-events: none;
    line-height: 1;
}

.waterfall-item-play-icon i {
    font-size: 24px;
    line-height: 1;
}

/* 筛选栏 */
.community-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 100;
}

/* 筛选按钮使用 common.css 中的统一样式: btn btn-secondary btn-md */

/* 响应式适配 */
@media (max-width: 1400px) {
    .waterfall-container {
    }
}

@media (max-width: 1200px) {
    .waterfall-container {
    }
}

@media (max-width: 900px) {
    .waterfall-container {
    }
}

@media (max-width: 768px) {
    .waterfall-container {
        padding: 0;
    }
    
    .community-filter-bar {
        flex-direction: column;
        gap: 16px;
        padding: 12px;
    }
    
    .community-filter-left,
    .community-filter-right {
        width: 100%;
        justify-content: center;
    }
    
    .community-filter-center {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .waterfall-container {
    }
}

/* 加载更多 */
.load-more-container {
    text-align: center;
    padding: 24px 0 40px;
}

.load-more-btn {
    padding: 8px 24px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-primary);
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* 加载提示 */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 公共页顶栏（遵循 common.css 设计语言）*/
.community-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    min-height: 48px;
    max-height: 50px;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

/* 主内容区域 */
.public-workspace .main-content-right-layout {
    overflow-y: auto;
}

.public-workspace .content-body {
    overflow-y: auto;
    padding: 40px 0px;
}

/* 左侧：品牌区域 */
.community-header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-brand-logo {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-brand-logo img {
    width: 20px;
    height: 20px;
    display: block;
}

.community-brand-text {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--color-text-primary);
}

/* 中间：分类导航 */
.community-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 右侧：用户信息 / 登录 */
.community-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.community-nav-item {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.community-nav-item:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border);
    background: var(--color-bg-primary);
}

.community-nav-item.active {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.community-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.community-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.community-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 公共页内容区布局 - 与 workspace 统一风格，保持合理内边距 */
