/* ============================================
   首页（PC）
   仅服务于 tpl/index_pc.html
   由 tpl/public/css/index.css 拆分而来；index.css 仍被频道页/资讯页等模板使用，请勿互相引用
   类名与 index-pc.js 渲染、dark-mode.css 保持一致
   ============================================ */

/* ---------- 工具栏：浏览模式下拉菜单 ---------- */
.view-mode-dropdown {
    position: relative;
    display: inline-block;
}

.view-mode-trigger {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.view-mode-trigger:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.view-mode-trigger .view-mode-icon {
    font-size: 14px;
    color: #ff6600;
}

.view-mode-trigger .view-mode-text {
    flex: 1;
}

.view-mode-trigger .dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.view-mode-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.view-mode-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.view-mode-dropdown.active .view-mode-menu {
    display: block;
}

.view-mode-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: none;
    border: none;
    color: #181C1F;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background-color 0.2s;
    position: relative;
}

.view-mode-item:hover {
    background-color: #f5f5f5;
}

.view-mode-item i:first-child {
    font-size: 14px;
    color: #666;
    width: 16px;
}

.view-mode-item span {
    flex: 1;
}

.view-mode-item .check-icon {
    font-size: 14px;
    color: #ff6600;
    opacity: 0;
    transition: opacity 0.2s;
}

.view-mode-item.active {
    color: #ff6600;
}

.view-mode-item.active .check-icon {
    opacity: 1;
}

.view-mode-item.active i:first-child {
    color: #ff6600;
}

/* ---------- 工具栏：繁简体切换 ---------- */
.traditional-chinese-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.traditional-chinese-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.traditional-chinese-btn.active {
    background-color: #fff3e6;
    border-color: #ff6600;
    color: #ff6600;
}

.traditional-chinese-btn i,
.traditional-chinese-btn .tc-text {
    font-size: 14px;
}

/* ---------- 工具栏：栏目快捷入口 ---------- */
.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-region {
    font-weight: 800;
    background: linear-gradient(180deg, #ffffff 0%, #fff7f0 100%);
    border-color: #ffe1d0;
    border-radius: 10px !important;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.feed-btn-region:hover {
    border-color: #ff6600;
    color: #ff6600;
    background: #fff1e6;
    transform: translateY(-1px);
    filter: none;
}

/* ---------- 帖子列表容器 ---------- */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 图文模式：左侧缩略图 + 右侧三排信息 */
.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;
}

.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;
}

.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;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.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;
}

.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,
.posts-container.text-only-view .post-author,
.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;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.posts-container.text-only-view .post-title .post-title-author,
.posts-container.text-only-view .post-title a.post-title-author:link,
.posts-container.text-only-view .post-title a.post-title-author:visited {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    text-decoration: none;
    margin-left: 8px;
    white-space: nowrap;
}

.posts-container.text-only-view .post-title a.post-title-author:hover {
    color: #ff6600;
    text-decoration: underline;
}

.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;
}

/* 标题链接 */
.posts-container .post-title .post-link,
.posts-container .post-title a:link {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.posts-container .post-title .post-link,
.posts-container .post-title a:visited {
    color: #656363;
    font: inherit;
    text-decoration: none;
}

.posts-container .post-title .post-link:hover,
.posts-container .post-title a:hover {
    text-decoration: underline;
}

/* 作者链接 */
.post-author-link {
    font-weight: 600;
    color: #181C1F;
    text-decoration: none;
    transition: color 0.2s;
}

.post-author-link:hover {
    color: #1E9FFF;
    text-decoration: none;
}

/* ---------- 加载指示器 / 占位图 ---------- */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    gap: 10px;
}

.loading-indicator.active,
.loading-indicator.sentinel-visible {
    display: flex;
}

.loading-indicator.sentinel-visible {
    opacity: 0.92;
}

.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;
}

.icon-list-hongbao {
    color: red;
}

/* ---------- 窄窗口降级（PC 缩小浏览器窗口） ---------- */
@media (max-width: 992px) {
    .toolbar-left {
        flex-wrap: wrap;
    }
}
