/* ==========================================================================
   HT-社区主题 圈子/论坛样式
   ========================================================================== */

/* ---------- 圈子卡片网格 ---------- */
.ht-circle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.ht-circle-card {
    background: var(--ht-bg-card);
    border-radius: var(--ht-radius);
    overflow: hidden;
    box-shadow: var(--ht-shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.ht-circle-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(20,30,60,.1); }
.ht-circle-cover { display: block; aspect-ratio: 16/7; overflow: hidden; background: linear-gradient(135deg, #667eea, #764ba2); }
.ht-circle-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-circle-cover-fallback {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; font-size: 48px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--ht-primary), #764ba2);
}
.ht-circle-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.ht-circle-title { margin: 0 0 8px; font-size: 17px; }
.ht-circle-title a { color: var(--ht-text); }
.ht-circle-title a:hover { color: var(--ht-primary); }
.ht-circle-desc { color: var(--ht-text-muted); font-size: 13px; margin-bottom: 12px; flex: 1; line-height: 1.6; }
.ht-circle-meta { display: flex; gap: 16px; font-size: 12px; color: var(--ht-text-muted); margin-bottom: 12px; padding-top: 10px; border-top: 1px dashed var(--ht-border); }
.ht-follow-circle.ht-followed { background: #f0f2f8; color: var(--ht-text-muted); border-color: var(--ht-border); }
.ht-follow-circle.ht-followed:hover { background: #e8eaef; }

/* ---------- 圈子详情头部 ---------- */
.ht-circle-header {
    background: var(--ht-bg-card);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}
.ht-circle-header-cover { height: 180px; overflow: hidden; position: relative; }
.ht-circle-header-cover img { width: 100%; height: 100%; object-fit: cover; }
.ht-circle-cover-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: 72px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--ht-primary), #764ba2);
}
.ht-circle-header-info { padding: 20px 24px; }
.ht-circle-name { margin: 0 0 8px; font-size: 24px; }
.ht-circle-header-info .ht-circle-desc { font-size: 14px; margin-bottom: 14px; }
.ht-circle-stats { display: flex; gap: 24px; margin-bottom: 16px; font-size: 14px; color: var(--ht-text-muted); }
.ht-circle-stats strong { color: var(--ht-text); font-size: 18px; margin-right: 4px; }
.ht-circle-actions { display: flex; gap: 10px; }

/* ---------- 发帖表单 ---------- */
.ht-post-form-wrap {
    background: var(--ht-bg-card);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.ht-post-form-title { margin: 0 0 16px; font-size: 18px; }
.ht-post-form-wrap textarea { min-height: 140px; }

/* ---------- 论坛排序标签 ---------- */
.ht-forum-tabs {
    display: flex; gap: 4px; margin-bottom: 16px;
    background: var(--ht-bg-card); border-radius: 10px; padding: 6px;
    box-shadow: var(--ht-shadow); width: fit-content;
}
.ht-forum-tabs a {
    padding: 6px 18px; border-radius: 8px; color: var(--ht-text-muted);
    font-size: 14px; font-weight: 500;
}
.ht-forum-tabs a.active { background: var(--ht-primary); color: #fff; }

/* ---------- 论坛帖子卡片 ---------- */
.ht-forum-post-list { display: flex; flex-direction: column; gap: 12px; }
.ht-forum-post-card {
    background: var(--ht-bg-card);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    padding: 16px 20px;
    transition: box-shadow .2s;
}
.ht-forum-post-card:hover { box-shadow: 0 4px 16px rgba(20,30,60,.1); }
.ht-forum-post-badges { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.ht-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 600; line-height: 1.6;
}
.ht-badge-top { background: #fff4e5; color: #b8741a; }
.ht-badge-essence { background: #fde8ec; color: #c5304e; }
.ht-badge-solved { background: #e6f7ed; color: #2b8a52; }
.ht-forum-post-title { margin: 0 0 6px; font-size: 17px; line-height: 1.4; }
.ht-forum-post-title a { color: var(--ht-text); }
.ht-forum-post-title a:hover { color: var(--ht-primary); }
.ht-forum-post-excerpt { color: var(--ht-text-muted); font-size: 13px; margin-bottom: 10px; line-height: 1.6; }
.ht-forum-post-meta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    font-size: 12px; color: var(--ht-text-muted);
    padding-top: 10px; border-top: 1px dashed var(--ht-border);
}
.ht-forum-post-circle {
    background: #eef2ff; color: var(--ht-primary); padding: 2px 8px;
    border-radius: 4px; font-weight: 500;
}
.ht-like-btn {
    background: none; border: 1px solid var(--ht-border); border-radius: 6px;
    padding: 3px 10px; font-size: 12px; color: var(--ht-text-muted);
    cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 4px;
}
.ht-like-btn:hover { border-color: var(--ht-primary); color: var(--ht-primary); }
.ht-like-btn.liked { background: #fef0f0; border-color: #f0a0a0; color: #e04040; }
.ht-like-btn.liked .ht-like-icon { color: #e04040; }
.ht-like-icon { font-size: 14px; }

/* ---------- 帖子详情 ---------- */
.ht-forum-single {
    background: var(--ht-bg-card);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    padding: 28px;
    margin-bottom: 20px;
}
.ht-forum-single-title { margin: 8px 0 12px; font-size: 24px; line-height: 1.4; }
.ht-forum-single-meta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    font-size: 13px; color: var(--ht-text-muted);
    padding-bottom: 16px; border-bottom: 1px solid var(--ht-border);
}
.ht-forum-single-content { font-size: 16px; line-height: 1.8; padding: 16px 0; }
.ht-forum-single-content h2 { font-size: 20px; }
.ht-forum-single-content img { border-radius: 8px; max-width: 100%; }
.ht-forum-single-footer { padding-top: 16px; border-top: 1px solid var(--ht-border); }
.ht-like-btn-large {
    padding: 8px 24px; font-size: 14px; border-radius: 8px;
    display: inline-flex; align-items: center; gap: 6px;
}

/* ---------- 最佳回答 ---------- */
.ht-best-answer {
    background: #f0faf4;
    border: 1px solid #b8e0c8;
    border-radius: var(--ht-radius);
    padding: 18px 20px;
    margin-bottom: 20px;
}
.ht-best-answer-label {
    color: #2b8a52; font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.ht-best-answer-body .ht-comment-author {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px;
}
.ht-best-answer-body .ht-comment-content { font-size: 15px; line-height: 1.7; }

/* ---------- 评论/回复 ---------- */
.ht-comments-section {
    background: var(--ht-bg-card);
    border-radius: var(--ht-radius);
    box-shadow: var(--ht-shadow);
    padding: 24px;
}
.ht-comments-title { margin: 0 0 16px; font-size: 18px; }
.ht-comment-list { list-style: none; margin: 16px 0 0; padding: 0; }
.ht-comment-list .comment { padding: 14px 0; border-bottom: 1px dashed var(--ht-border); }
.ht-comment-list .children { list-style: none; margin: 12px 0 0 40px; padding: 0; }
.ht-comment-body { display: flex; gap: 12px; }
.ht-comment-body img.avatar { border-radius: 50%; flex-shrink: 0; }
.ht-comment-main { flex: 1; min-width: 0; }
.ht-comment-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.ht-comment-meta .ht-comment-author { font-weight: 600; color: var(--ht-text); }
.ht-comment-meta .ht-comment-date { color: var(--ht-text-muted); font-size: 12px; }
.ht-comment-content { font-size: 14px; line-height: 1.7; }
.ht-comment-actions { margin-top: 8px; display: flex; gap: 12px; align-items: center; }
.ht-comment-actions a, .ht-comment-actions button {
    font-size: 12px; color: var(--ht-text-muted); background: none; border: none;
    cursor: pointer; padding: 0;
}
.ht-comment-actions a:hover, .ht-comment-actions button:hover { color: var(--ht-primary); }
.ht-adopt-btn { color: #2b8a52 !important; font-weight: 600; }
.ht-comment-best { background: #f0faf4; border-radius: 8px; padding: 12px !important; }

/* ---------- 圈子侧边栏 ---------- */
.ht-circle-sidebar-desc { font-size: 13px; color: var(--ht-text-muted); margin-bottom: 12px; line-height: 1.6; }
.ht-circle-sidebar-stats { display: flex; gap: 16px; margin-bottom: 14px; font-size: 13px; color: var(--ht-text-muted); }
.ht-circle-sidebar-stats strong { color: var(--ht-text); font-size: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .ht-circle-grid { grid-template-columns: 1fr; }
    .ht-circle-header-cover { height: 120px; }
    .ht-circle-name { font-size: 20px; }
    .ht-forum-single { padding: 18px; }
    .ht-forum-single-title { font-size: 20px; }
    .ht-comment-list .children { margin-left: 20px; }
}

/* ---------- 举报按钮 ---------- */
.ht-report-btn {
    background: none;
    border: 1px solid var(--ht-border);
    color: var(--ht-text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}
.ht-report-btn:hover { border-color: #e04040; color: #e04040; }
.ht-report-link {
    background: none;
    border: none;
    color: var(--ht-text-muted);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.ht-report-link:hover { color: #e04040; }

/* ---------- 举报弹窗 ---------- */
.ht-report-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.ht-report-modal.active { display: flex; }
.ht-report-modal-box {
    background: var(--ht-bg-card);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.ht-report-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}
.ht-report-modal textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid var(--ht-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 16px;
    box-sizing: border-box;
}
.ht-report-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.ht-report-modal-msg {
    margin-top: 10px;
    font-size: 13px;
}

/* ---------- 运营通知条 ---------- */
.ht-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}
.ht-notice-error { background: #fde8ec; color: #c5304e; border-left: 3px solid #c5304e; }
.ht-notice-warning { background: #fff8e6; color: #b8741a; border-left: 3px solid #f0b429; }
.ht-notice-info { background: #e8f0fe; color: #1a73e8; border-left: 3px solid #1a73e8; }
