/* ========== 论坛两栏布局 ========== */

.ioforum-layout {
    display: block;
}
.ioforum-main {
    width: 100%;
}
.ioforum-sidebar {
    display: none;
}

/* PC 端：整体居中 + 主内容自适应 + 侧栏固定 320px + 吸顶 */
@media (min-width: 992px) {
    .ioforum-layout {
        display: flex;
        gap: 20px;
        align-items: flex-start;
        max-width: 1100px;
        margin: 0 auto;
    }
    .ioforum-main {
        flex: 1;
        min-width: 0;
        max-width: none;
    }
    .ioforum-sidebar {
        display: block;
        flex: 0 0 320px;
        width: 320px;
        position: sticky;
        top: 20px;
        align-self: flex-start;
        /* 不设 max-height，不设 overflow，让侧栏完整显示 */
    }
}

/* 有面包屑的页面：侧栏下移，对齐主内容第一张卡片 */
@media (min-width: 992px) {
    .ioforum-layout.ioforum-has-breadcrumb .ioforum-sidebar {
        padding-top: 32px;
    }
}
/* 帖子/回复 操作按钮 */
.ioforum-topic-actions,
.ioforum-reply-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    opacity: 0;
    transition: opacity .2s;
}
.ioforum-topic-actions { vertical-align: middle; }
.ioforum-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 6px;
    color: #888;
    font-size: 14px;
    text-decoration: none;
    transition: all .15s;
}
.ioforum-action-btn:hover {
    background: #f1404b;
    color: #fff;
}
/* PC：hover 显示 */
@media (hover: hover) and (pointer: fine) {
    .ioforum-topic-header:hover .ioforum-topic-actions,
    .ioforum-reply-item:hover  .ioforum-reply-actions {
        opacity: 1;
    }
}
/* 移动端：常显 */
@media (hover: none) {
    .ioforum-topic-actions,
    .ioforum-reply-actions { opacity: 1; }
}

/* 移动端：侧栏隐藏 */
@media (max-width: 991px) {
    .ioforum-sidebar {
        display: none;
    }
}

/* ========== 侧栏小工具间距 + 内边距 ========== */

.ioforum-sidebar .io-sidebar-widget {
    margin-bottom: 8px !important;
}
.ioforum-sidebar .io-sidebar-widget:last-child {
    margin-bottom: 0 !important;
}

/* 只改外层 card-body 的 padding，不动内部卡片 */
.ioforum-sidebar .io-sidebar-widget > .card-body {
    padding: 12px 14px !important;
}

/* 详情页：侧栏下移，对齐帖子卡片 */
body.ioforum-topic-page .ioforum-sidebar {
    padding-top: 40px !important;
}

/* ========== 版块图标通用 ========== */

.ioforum-forum-icon {
    display: inline-block;
    vertical-align: middle;
    background-color: #f1f1f1;
}
.ioforum-forum-icon--letter {
    background-color: #f1404b !important;
    color: #fff;
    font-weight: 600;
}

/* ========== 楼中楼（无红线版） ========== */

.ioforum-reply-children {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fbfcfd;
    border-radius: 8px;
    border-left: none;
}

.ioforum-reply-child {
    margin-top: 6px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 6px;
    transition: background .15s;
}
.ioforum-reply-child:first-child {
    margin-top: 0;
}
.ioforum-reply-child:hover {
    background: #fffafa;
}

.ioforum-reply-child-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.ioforum-reply-child-name {
    font-size: 12px;
    font-weight: 600;
    color: #1f2329;
}
.ioforum-reply-child-time {
    font-size: 11px;
    color: #9aa1ad;
}
.ioforum-quote-btn--child {
    margin-left: auto;
    background: none;
    border: none;
    color: #8a919f;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}
.ioforum-reply-child-content {
    font-size: 13px;
    line-height: 1.7;
    color: #2b2f36;
}

/* ========== 查看更多回复按钮 ========== */

.ioforum-reply-more {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ffd9dc;
    border-radius: 6px;
    color: #f1404b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    line-height: 1.4;
}
.ioforum-reply-more:hover {
    background: #fff5f5;
    border-color: #f1404b;
}
.ioforum-reply-more:active {
    background: #ffe3e5;
}

/* ========== 回复对象提示条 ========== */

.ioforum-reply-hint {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #fff5f5;
    border: 1px solid #ffd9dc;
    border-radius: 8px;
    font-size: 13px;
    color: #f1404b;
}
.ioforum-reply-hint-cancel {
    margin-left: auto;
    background: none;
    border: none;
    color: #f1404b;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}
.ioforum-reply-hint-cancel:hover {
    background: #ffe3e5;
}

/* ========== 移动端缩进减小 ========== */

@media (max-width: 575px) {
    .ioforum-reply-children {
        padding: 6px 8px;
    }
}
/* =========================================================
 * 帖子列表（方案 2：左侧彩色竖条 + 单行 meta）
 * ========================================================= */

.ioforum-topic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ioforum-topic-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 10px;
    padding: 14px 18px 14px 0;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    transition: all .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* 左侧状态条 */
.ioforum-topic-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #e8eaed;
    transition: all .15s;
}
.ioforum-topic-item.is-top::before  { background: #f1404b; }
.ioforum-topic-item.is-best::before { background: #f5a623; }

.ioforum-topic-item:hover {
    box-shadow: 0 4px 14px rgba(241,64,75,0.10);
    transform: translateY(-1px);
}
.ioforum-topic-item:hover::before {
    width: 4px;
}
.ioforum-topic-item:hover .ioforum-topic-title {
    color: #f1404b;
}

/* 头像 */
.ioforum-topic-item img.ioforum-topic-avatar,
.ioforum-topic-item .avatar {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    margin-left: 16px;
    flex-shrink: 0;
    object-fit: cover;
}

/* 中间主体 */
.ioforum-topic-body {
    flex: 1;
    min-width: 0;
}

.ioforum-topic-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2329;
    margin: 0 0 5px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .15s;
}

.ioforum-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: middle;
}
.ioforum-badge-top  { background: #fff0f0; color: #f1404b; }
.ioforum-badge-best { background: #fff8e6; color: #d48806; }

.ioforum-topic-meta {
    font-size: 12px;
    color: #9aa1ad;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ioforum-dot {
    color: #d8dce1;
}

/* 右侧统计 */
.ioforum-topic-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
    align-items: center;
}
.ioforum-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #8a919f;
}
.ioforum-stat-icon {
    font-size: 14px;
    opacity: .6;
}
.ioforum-stat-num {
    font-weight: 600;
    color: #1f2329;
}
.ioforum-stat-reply .ioforum-stat-num {
    color: #f1404b;
}

/* 发新帖按钮 */
.ioforum-new-topic-btn {
    background: #f1404b;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
    flex-shrink: 0;
}
.ioforum-new-topic-btn:hover {
    background: #d93540;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(241,64,75,0.3);
}

/* 移动端 */
@media (max-width: 640px) {
    .ioforum-topic-item {
        padding: 12px 14px 12px 0;
        gap: 10px;
    }
    .ioforum-topic-item img.ioforum-topic-avatar,
    .ioforum-topic-item .avatar {
        width: 34px !important;
        height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
        margin-left: 12px;
    }
    .ioforum-topic-title {
        font-size: 14px;
    }
    .ioforum-topic-meta {
        font-size: 11px;
        gap: 4px;
    }
    /* 移动端隐藏「最后回复」那一段 */
    .ioforum-topic-meta .ioforum-last-reply-mobile-hide {
        display: none;
    }
    .ioforum-topic-stats {
        gap: 10px;
    }
    .ioforum-stat {
        font-size: 12px;
    }
}