/* Index page styles (index.html) */

/* 浏览模式选择器 */
.view-mode-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-mode-option {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.view-mode-option:hover {
    background-color: #f5f5f5;
}

.view-mode-option.active {
    background-color: #f0f0f0;
    color: #ff6600;
}

/* 帖子容器 */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 频道/资讯头部（列表页顶部） */
.feed-header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    margin: 0 0 8px 0;
}

.feed-ad-slot {
    height: 90px;
    background: #f3f4f6;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    font-size: 13px;
}

.feed-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.feed-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.feed-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f5f5f5;
    border: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
}

.feed-icon i {
    font-size: 18px;
    color: #555;
}

.feed-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feed-meta {
    min-width: 0;
}

.feed-title {
    font-size: 18px;
    font-weight: 800;
    color: #181C1F;
    line-height: 1.2;
    margin-bottom: 4px;
}

.feed-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    max-width: 680px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.feed-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.feed-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    background: #ffffff;
    color: #181C1F;
}

.feed-btn i { font-size: 13px; }

.feed-btn-ghost:hover {
    background: #f5f5f5;
}

.feed-btn-primary {
    background: #ff6600;
    border-color: #ff6600;
    color: #ffffff;
}

.feed-btn-primary:hover {
    filter: brightness(0.95);
}

.feed-btn-followed {
    background: #e8f5e9;
    border-color: #c8e6c9;
    color: #2e7d32;
}

.feed-btn-followed:hover {
    background: #c8e6c9;
    filter: brightness(0.95);
}

.feed-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .feed-info {
        flex-direction: column;
        align-items: flex-start;
    }
    .feed-actions {
        width: 100%;
    }
    .feed-btn {
        flex: 1;
        justify-content: center;
    }
}

/* 图文模式布局 - 最前面一图，后面3排元素 */
.posts-container.image-text-view .post-item {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 14px 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* 左侧缩略图 */
.posts-container.image-text-view .post-thumbnail-wrapper {
    width: 100px;
    height: 75px;
    min-width: 100px;
    flex-shrink: 0;
}

.posts-container.image-text-view .post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    background-color: #f5f5f5;
}

.posts-container.image-text-view .post-thumbnail.default-image {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.posts-container.image-text-view .post-thumbnail.default-image i {
    font-size: 32px;
    color: #ccc;
}

/* 右侧内容区 - 3排元素 */
.posts-container.image-text-view .post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* 第一排：发布人、时间等信息（小字） */
.posts-container.image-text-view .post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.posts-container.image-text-view .post-author {
    font-weight: 600;
    color: #181C1F;
}

.posts-container.image-text-view .post-time {
    color: #999;
}

/* 第二排：标题 */
.posts-container.image-text-view .post-title {
    font-size: 16px;
    font-weight: 700;
    color: #181C1F;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 标题里的链接：保持和 post-title 一致的样式 */
.posts-container .post-title .post-link,
.posts-container .post-title a {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.posts-container .post-title .post-link:hover,
.posts-container .post-title a:hover {
    text-decoration: underline;
}

/* 第三排：交互工具区 */
.posts-container.image-text-view .post-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 2px;
}

/* 图文模式下：略微收紧图标尺寸 */
.posts-container.image-text-view .post-action i {
    font-size: 13px;
}

/* 纯文字模式布局 */
.posts-container.text-only-view .post-item {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 纯文字模式下，标题和footer在同一行 */
.posts-container.text-only-view .post-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.posts-container.text-only-view .post-header {
    display: none;
}

.posts-container.text-only-view .post-author {
    display: none;
}

.posts-container.text-only-view .post-time {
    display: none;
}

.posts-container.text-only-view .post-title {
    font-size: 16px;
    font-weight: 400;
    color: #181C1F;
    line-height: 1.4;
    margin: 0;
    display: inline;
    vertical-align: middle;
}

/* 纯文字模式下，电脑端显示评论/分享/赞，手机端隐藏（见 media） */
.posts-container.text-only-view .post-footer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 12px;
}

.posts-container.text-only-view .post-action {
    padding: 2px 6px;
    font-size: 12px;
}

/* 加载指示器 */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    gap: 10px;
}

.loading-indicator.active {
    display: flex;
}

.loading-indicator i {
    font-size: 24px;
    color: #ff6600;
}

/* 默认图片占位符 */
.default-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.default-image i {
    font-size: 48px;
    opacity: 0.5;
}

/* 手机端纯文字模式隐藏评论/分享/赞 */
@media (max-width: 768px) {
    .posts-container.text-only-view .post-footer {
        display: none;
    }
}

@media (max-width: 480px) {
    .view-mode-selector {
        gap: 4px;
    }

    .view-mode-option {
        padding: 5px 10px;
        font-size: 13px;
    }

    .posts-container.text-only-view .post-footer {
        display: none;
    }
}

