/* ==========================================================================
   陈乐论坛 (chenle-forum) 样式
   配色对齐主题：#0099cc 主蓝 / #3498db 悬停 / #2980b9 深蓝 / #eef0f3 边框
   圆角统一 8px，白底卡片
   ========================================================================== */

.cfl-main {
    padding: 20px;
    color: #333;
}

.cfl-main a {
    color: #333;
    transition: color .2s ease;
}
.cfl-main a:hover {
    color: #3498db;
    text-decoration: none;
}

/* ---------- 面包屑 ---------- */
.cfl-breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
}
.cfl-breadcrumb a {
    color: #666;
}
.cfl-breadcrumb a:hover {
    color: #3498db;
}
.cfl-breadcrumb .cfl-crumb-home {
    font-size: 14px;
    vertical-align: -1px;
}
.cfl-sep {
    margin: 0 8px;
    color: #ccc;
}
.cfl-crumb-current {
    color: #999;
}

/* ---------- 页头 ---------- */
.cfl-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.cfl-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0;
}
.cfl-page-actions {
    display: flex;
    gap: 8px;
}

/* ---------- 提示条 ---------- */
.cfl-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
}
.cfl-alert-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}
.cfl-alert-info {
    background: #eaf6fd;
    color: #0f6f9e;
    border: 1px solid #bce3f5;
}

/* ---------- 按钮 ---------- */
.cfl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0099cc;
    border: none;
    color: #fff !important;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
}
.cfl-btn:hover {
    background: #007aa3;
    color: #fff !important;
    transform: translateY(-1px);
}
.cfl-btn-primary {
    background: #0099cc;
}
.cfl-btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}
.cfl-btn-danger {
    background: #e74c3c;
}
.cfl-btn-danger:hover {
    background: #c0392b;
}
.cfl-btn-approve {
    background: #27ae60;
}
.cfl-btn-approve:hover {
    background: #1e8449;
}

/* ---------- 搜索 ---------- */
.cfl-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 420px;
    margin: 0;
}
.cfl-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #ccd2d8;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.cfl-search input[type="search"]:focus {
    border-color: #0099cc;
    box-shadow: 0 0 0 3px rgba(0, 153, 204, .12);
}

/* ---------- 板块卡片 ---------- */
.cfl-board-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.cfl-board-card:hover {
    border-color: #d8e8f2;
    box-shadow: 0 4px 14px rgba(0, 153, 204, .08);
}
.cfl-board-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0099cc;
    background: linear-gradient(135deg, #eaf6fd, #d6ecf7);
    border-radius: 8px;
}
.cfl-board-main {
    flex: 1;
    min-width: 0;
}
.cfl-board-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}
.cfl-board-title a {
    color: #333;
}
.cfl-board-title a:hover {
    color: #3498db;
}
.cfl-board-desc {
    margin: 0;
    font-size: 13px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cfl-board-meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #999;
    text-align: right;
}
.cfl-board-meta .cfl-last {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cfl-board-meta .cfl-last a {
    color: #666;
}
.cfl-last-time {
    margin-left: 6px;
    color: #bbb;
}

/* ---------- 通用统计 ---------- */
.cfl-stat b {
    color: #555;
    font-weight: 600;
}
.cfl-stat {
    margin-left: 10px;
}
.cfl-dot {
    margin: 0 8px;
    color: #ccc;
}

/* ---------- 主题列表 ---------- */
.cfl-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 8px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef0f3;
}
.cfl-topic-list {
    margin-bottom: 12px;
}
.cfl-topic-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    transition: box-shadow .2s ease;
}
.cfl-topic-row:hover {
    box-shadow: 0 3px 12px rgba(0, 153, 204, .08);
}
.cfl-topic-sticky {
    border-left: 3px solid #0099cc;
}
.cfl-topic-pending {
    background: #fffdf3;
    border-color: #f3e6c0;
}
.cfl-topic-avatar {
    flex-shrink: 0;
}
.cfl-topic-avatar img,
.cfl-reply-avatar img {
    border-radius: 50%;
    object-fit: cover;
    background: #f5f5f5;
    border: 1px solid #f5f5f5;
}
.cfl-topic-main {
    flex: 1;
    min-width: 0;
}
.cfl-topic-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.4;
}
.cfl-topic-title a {
    color: #333;
}
.cfl-topic-title a:hover {
    color: #3498db;
}
.cfl-topic-meta {
    font-size: 13px;
    color: #999;
}
.cfl-topic-stats {
    flex-shrink: 0;
    font-size: 13px;
    color: #999;
    text-align: center;
}
.cfl-topic-last {
    flex-shrink: 0;
    min-width: 110px;
    font-size: 12px;
    color: #bbb;
    text-align: right;
}
.cfl-last-author {
    display: block;
    color: #888;
}
.cfl-topic-actions {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
}

/* ---------- 徽章 ---------- */
.cfl-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    line-height: 18px;
    border-radius: 4px;
    vertical-align: 1px;
    margin-right: 6px;
    font-weight: 400;
}
.cfl-badge-sticky {
    background: #0099cc;
    color: #fff;
}
.cfl-badge-closed {
    background: #b0b6bc;
    color: #fff;
}
.cfl-badge-pending {
    background: #f0ad4e;
    color: #fff;
}

/* ---------- 帖子详情 ---------- */
.cfl-topic {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 18px;
}
.cfl-topic-head .cfl-page-title {
    margin-bottom: 10px;
    line-height: 1.4;
}
.cfl-topic-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 13px;
    color: #999;
}
.cfl-meta-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cfl-meta-author img {
    border-radius: 50%;
    object-fit: cover;
}
.cfl-topic-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
    font-size: 15px;
    line-height: 1.8;
    word-wrap: break-word;
}

/* ---------- 管理工具栏 ---------- */
.cfl-mod-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 0;
    padding: 10px 12px;
    background: #f7f9fb;
    border-radius: 8px;
}
.cfl-mod-form {
    display: inline-block;
    margin: 0;
}
.cfl-mod-move {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cfl-select {
    height: 30px;
    padding: 0 8px;
    border: 1px solid #ccd2d8;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    outline: none;
}

/* ---------- 回复 ---------- */
.cfl-replies {
    margin-top: 8px;
}
.cfl-reply {
    display: flex;
    gap: 14px;
    padding: 16px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
}
.cfl-reply-pending {
    background: #fffdf3;
    border-color: #f3e6c0;
}
.cfl-reply-side {
    flex-shrink: 0;
    width: 72px;
    text-align: center;
}
.cfl-reply-avatar img {
    width: 48px;
    height: 48px;
}
.cfl-reply-author {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    word-break: break-all;
}
.cfl-reply-body {
    flex: 1;
    min-width: 0;
}
.cfl-reply-head {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}
.cfl-reply-floor {
    color: #bbb;
    margin-right: 10px;
}
.cfl-reply-content {
    font-size: 14px;
    line-height: 1.8;
    word-wrap: break-word;
}
.cfl-reply-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
}
.cfl-pending-section {
    margin: 16px 0;
    padding: 14px;
    background: #fffdf3;
    border: 1px dashed #f0ad4e;
    border-radius: 8px;
}
.cfl-pending-excerpt {
    margin: 6px 0 0;
    font-size: 13px;
    color: #999;
}

/* ---------- 回复表单 ---------- */
.cfl-reply-form-wrap {
    margin-top: 18px;
}
.cfl-form {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    padding: 18px;
}
.cfl-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 6px;
}
.cfl-input,
.cfl-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccd2d8;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 14px;
}
.cfl-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}
.cfl-input:focus,
.cfl-textarea:focus {
    border-color: #0099cc;
    box-shadow: 0 0 0 3px rgba(0, 153, 204, .12);
}
.cfl-form-footer {
    display: flex;
    justify-content: flex-end;
}

/* ---------- 附件上传与展示 ---------- */
.cfl-file {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px dashed #ccd2d8;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    background: #fafbfc;
    cursor: pointer;
}
.cfl-file-hint {
    margin: 6px 0 14px;
    font-size: 12px;
    color: #999;
}
.cfl-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e8ecf0;
}
.cfl-att-image img {
    display: block;
    max-width: 200px;
    max-height: 160px;
    border-radius: 8px;
    border: 1px solid #eef0f3;
    object-fit: cover;
    transition: transform .2s ease, box-shadow .2s ease;
}
.cfl-att-image:hover img {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0, 153, 204, .18);
}
.cfl-att-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f7f9fb;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: all .2s ease;
}
.cfl-att-file:hover {
    background: #eaf6fd;
    color: #0099cc;
    border-color: #bce3f5;
}
.cfl-att-file .fa {
    color: #0099cc;
}
.cfl-att-size {
    color: #999;
    font-size: 12px;
}

/* 附件图片灯箱 */
.cfl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(20, 20, 20, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.cfl-lightbox.active {
    opacity: 1;
    visibility: visible;
}
.cfl-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.cfl-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: background .2s ease;
}
.cfl-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ---------- 最新帖子 ---------- */
.cfl-recent-list {
    margin-bottom: 16px;
}
.cfl-recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    font-size: 14px;
}
.cfl-recent-board {
    flex-shrink: 0;
    padding: 1px 8px;
    font-size: 12px;
    color: #0f6f9e;
    background: #eaf6fd;
    border-radius: 4px;
}
.cfl-recent-title {
    flex: 1;
    min-width: 0;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cfl-recent-title:hover {
    color: #3498db;
}
.cfl-recent-meta {
    flex-shrink: 0;
    font-size: 12px;
    color: #bbb;
    white-space: nowrap;
}

/* ---------- 论坛专属侧边栏 ---------- */
.cfl-sb-search {
    padding: 12px;
}
.cfl-sb-search-form {
    margin: 0;
    width: 100%;
}
.cfl-sb-search-box {
    display: flex;
    align-items: center;
    border: 1px solid #ccd2d8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.cfl-sb-search-box:focus-within {
    border-color: #0099cc;
    box-shadow: 0 0 0 2px rgba(0, 153, 204, .12);
}
.cfl-sb-search-input {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border: none;
    outline: none;
    font-size: 13px;
    color: #333;
}
.cfl-sb-search-btn {
    flex-shrink: 0;
    align-self: stretch;
    background: #0099cc;
    color: #fff;
    border: none;
    padding: 9px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s;
}
.cfl-sb-search-btn:hover {
    background: #007aa3;
}

.cfl-sb-results {
    padding: 14px 12px;
}
.cfl-sb-results .widget-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef0f3;
}
.cfl-sb-empty {
    margin: 0;
    font-size: 13px;
    color: #999;
}
.cfl-sb-group {
    margin-bottom: 12px;
}
.cfl-sb-group:last-child {
    margin-bottom: 0;
}
.cfl-sb-group-title {
    font-size: 12px;
    color: #999;
    margin: 0 0 6px;
}
.cfl-sb-item {
    display: block;
    padding: 7px 10px;
    margin-bottom: 6px;
    background: #f7f9fb;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: all .2s ease;
}
.cfl-sb-item:last-child {
    margin-bottom: 0;
}
.cfl-sb-item:hover {
    background: #eaf6fd;
    color: #0099cc;
}
.cfl-sb-item-title {
    display: block;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cfl-sb-item-board {
    display: inline-block;
    margin-top: 3px;
    padding: 0 6px;
    font-size: 11px;
    color: #0f6f9e;
    background: #eaf6fd;
    border-radius: 4px;
}

/* ---------- 搜索 / 空状态 ---------- */
.cfl-search-item {
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
}
.cfl-search-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
}
.cfl-search-excerpt {
    font-size: 13px;
    color: #888;
    margin: 0 0 8px;
}
.cfl-search-meta {
    font-size: 12px;
    color: #bbb;
}
.cfl-search-meta span {
    margin-right: 12px;
}
.cfl-empty {
    padding: 28px;
    text-align: center;
    color: #999;
    background: #fff;
    border: 1px dashed #e0e3e8;
    border-radius: 8px;
    margin: 12px 0;
}
.cfl-board-desc-block {
    font-size: 14px;
    color: #888;
    margin: -6px 0 16px;
    padding: 12px 14px;
    background: #f7f9fb;
    border-radius: 8px;
}
.cfl-home-hint {
    font-size: 13px;
    color: #0f6f9e;
    margin: -6px 0 14px;
    padding: 10px 14px;
    background: #eaf6fd;
    border: 1px solid #bce3f5;
    border-radius: 8px;
}

/* ---------- 分页 ---------- */
.cfl-pagination {
    margin: 18px 0;
    display: flex;
    justify-content: center;
}
.cfl-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.cfl-pagination li {
    margin: 0;
}
.cfl-page-btn {
    display: inline-block;
    min-width: 34px;
    padding: 6px 12px;
    text-align: center;
    background: #fff;
    border: 1px solid #e0e3e8;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    transition: all .2s ease;
}
a.cfl-page-btn:hover {
    background: #0099cc;
    color: #fff;
    border-color: #0099cc;
}
.cfl-page-current {
    background: #0099cc;
    color: #fff;
    border-color: #0099cc;
}
.cfl-page-dots {
    padding: 6px 4px;
    color: #bbb;
}

/* ---------- 标签页（个人中心） ---------- */
.cfl-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #eef0f3;
}
.cfl-tab {
    padding: 10px 18px;
    font-size: 15px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}
.cfl-tab:hover {
    color: #3498db;
}
.cfl-tab.active {
    color: #0099cc;
    font-weight: 600;
    border-bottom-color: #0099cc;
}
.cfl-my-replies {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cfl-my-reply {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
}
.cfl-my-reply-topic {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}
.cfl-my-reply-excerpt {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}
.cfl-my-reply-meta {
    font-size: 12px;
    color: #bbb;
}

/* ---------- 响应式 ---------- */
@media (max-width: 767px) {
    .cfl-main {
        padding: 12px 8px;
    }
    .cfl-topic-row,
    .cfl-board-card {
        flex-wrap: wrap;
    }
    .cfl-topic-stats,
    .cfl-topic-last {
        display: none;
    }
    .cfl-board-meta {
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        width: 100%;
    }
    .cfl-reply {
        flex-direction: column;
    }
    .cfl-reply-side {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .cfl-reply-author {
        margin-top: 0;
    }
    .cfl-page-head {
        flex-direction: column;
        align-items: stretch;
    }
    .cfl-search {
        max-width: none;
    }
}
