/* ============================================================
   反馈系统前台样式（兔小巢风格）
   ============================================================ */
:root {
    --primary: #0052d9;
    --primary-hover: #0043b8;
    --primary-light: #e8f0fe;
    --bg: #f3f5f9;
    --card: #ffffff;
    --border: #e8eaef;
    --text: #1a2233;
    --text2: #5f6b7f;
    --text3: #98a2b3;
    --green: #00a870;
    --orange: #e37318;
    --red: #d9455c;
    --radius: 10px;
    --shadow: 0 1px 4px rgba(26, 34, 51, .06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 微信 X5 / 安卓 WebView 兼容 */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }

/* ---------------- 顶栏 ---------------- */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-in {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand-logo {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 700; flex: none;
}
.brand-logo-default {
    background: transparent;
    border-radius: 0;
}
.brand-logo-default img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.brand-logo-img {
    height: 32px; max-width: 140px;
    object-fit: contain; border-radius: 6px; flex: none;
}
.brand-name { font-size: 17px; font-weight: 700; color: var(--text); }

.top-menu { display: flex; align-items: center; gap: 2px; flex: none; }
.tmenu { color: var(--text2); font-size: 14px; padding: 7px 12px; border-radius: 7px; transition: color .15s, background .15s; }
.tmenu:hover { color: var(--primary); background: var(--primary-light); }
.tmenu.cur { color: var(--primary); font-weight: 600; background: var(--primary-light); }

.top-search {
    flex: 1;
    max-width: 360px;
    display: flex;
    background: #f2f4f8;
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
    min-width: 0;
}
.top-search input {
    flex: 1; border: 0; background: transparent; outline: none;
    padding: 0 12px; font-size: 13px; min-width: 0;
}
.search-btn {
    border: 0; background: transparent; color: var(--text2);
    padding: 0 14px; cursor: pointer; font-size: 13px;
    -webkit-appearance: none; appearance: none;
}
.search-btn:active { color: var(--primary); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex: none; }
.login-link { color: var(--text2); font-size: 14px; }
.user-chip { display: flex; align-items: center; gap: 7px; color: var(--text2); }
.user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 按钮 ---------------- */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff !important;
    border: 0;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    -webkit-appearance: none; appearance: none;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { opacity: .85; }
.btn-new { padding: 8px 16px; }
.btn-ghost {
    display: inline-block;
    border: 1px solid var(--border);
    background: #fff; color: var(--text2);
    border-radius: 8px; padding: 9px 20px;
    font-size: 14px; cursor: pointer;
}
.btn-block { width: 100%; display: block; }

/* ---------------- 布局 ---------------- */
.page.container { max-width: 1080px; margin: 0 auto; padding: 18px 16px 40px; }
.layout { display: flex; gap: 18px; align-items: flex-start; }
.main { flex: 1; min-width: 0; }
.side { width: 280px; flex: none; position: sticky; top: 76px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(232, 234, 239, .6);
}

/* ---------------- 首页信息卡片（官方公告 / 反馈指南） ---------------- */
.home-card { padding: 20px 22px; margin-bottom: 14px; }
.home-title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.home-title .ti { color: var(--primary); display: inline-flex; flex: none; }
.home-title .ti svg { width: 20px; height: 20px; display: block; }
.home-guide ul { list-style: none; }
.home-guide li { font-size: 14px; color: var(--text2); padding: 5px 0; }
.home-guide li::before { content: "·"; color: var(--primary); font-weight: 700; margin-right: 9px; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; padding: 6px; margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab {
    flex: none;
    padding: 7px 16px;
    border-radius: 7px;
    color: var(--text2);
    font-size: 14px;
    white-space: nowrap;
}
.tab:hover { color: var(--primary); background: #f2f6ff; }
.tab.cur { background: var(--primary); color: #fff; font-weight: 600; }

.filter-tip { font-size: 13px; color: var(--text2); margin-bottom: 12px; padding-left: 4px; }
.filter-tip b { color: var(--text); }

/* ---------------- 反馈列表 ---------------- */
.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-item { padding: 16px 18px; position: relative; }
.fb-item:hover { border-color: #d4e2fc; }

.top-flag {
    position: absolute; top: 0; right: 0;
    background: var(--orange); color: #fff;
    font-size: 11px; padding: 2px 10px;
    border-radius: 0 10px 0 8px;
}

.fb-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; color: #fff; flex: none;
    font-weight: 600; text-align: center; vertical-align: middle;
}
.fb-meta { display: flex; flex-direction: column; min-width: 0; }
.fb-user { font-size: 14px; font-weight: 600; }
.fb-time { font-size: 12px; color: var(--text3); }
.fb-right { margin-left: auto; flex: none; }

.badge {
    display: inline-block; font-size: 12px; padding: 2px 9px;
    border-radius: 20px; white-space: nowrap;
}
.badge-pending    { background: #f0f1f5; color: var(--text2); }
.badge-planned    { background: #e8f0fe; color: var(--primary); }
.badge-developing { background: #fff3e8; color: var(--orange); }
.badge-done       { background: #e6f7ef; color: var(--green); }

.fb-content { font-size: 14.5px; word-break: break-word; }
.fb-link { color: var(--text); }
.fb-link:hover { color: var(--primary); }

.tag-chip {
    display: inline-block; margin-top: 8px;
    background: #f2f6ff; color: var(--primary);
    font-size: 12px; padding: 2px 10px; border-radius: 20px;
    border: 0; cursor: pointer;
}

.fb-imgs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: flex-end; }
.fb-imgs img {
    width: 86px; height: 86px; object-fit: cover;
    border-radius: 8px; display: block;
}
.img-more {
    width: 86px; height: 86px; border-radius: 8px;
    background: rgba(26, 34, 51, .55); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
}

.fb-foot {
    display: flex; align-items: center; gap: 18px;
    margin-top: 12px; padding-top: 11px;
    border-top: 1px dashed #eef0f4;
}
.act { color: var(--text3); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.act .ico { display: inline-flex; align-items: center; }
.ico svg { width: 15px; height: 15px; display: block; }
a.act:hover { color: var(--primary); }
.act.view { cursor: default; }
.go-detail { margin-left: auto; }

.like-btn { cursor: pointer; }
.like-btn:hover { color: var(--primary); }
.like-btn.liked { color: var(--primary); font-weight: 700; }
.like-btn.liked .ico { animation: pop .25s; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; }
.empty-ico { color: var(--text3); margin-bottom: 12px; }
.empty-ico svg { width: 42px; height: 42px; display: block; margin: 0 auto; }
.empty p { color: var(--text3); margin-bottom: 18px; }

/* ---------------- 侧栏 ---------------- */
.side-post-btn {
    display: block; width: 100%;
    padding: 12px; font-size: 15px; margin-bottom: 14px;
}
.side-card { padding: 16px 18px; margin-bottom: 14px; }
.side-title { font-size: 15px; margin-bottom: 12px; }
.announce { font-size: 13px; color: var(--text2); word-break: break-word; }

/* ---------------- 文章页（常见问题 / 更新日志） ---------------- */
.page-card { padding: 22px; }
.page-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.page-title { font-size: 20px; font-weight: 700; }
.page-count { color: var(--text3); font-size: 13px; }
.empty { color: var(--text3); text-align: center; padding: 40px 0; }
.article-list { display: flex; flex-direction: column; }
.article-item { padding: 16px 0; border-bottom: 1px dashed var(--border); }
.article-item:last-child { border-bottom: 0; }
.article-title { font-size: 16px; font-weight: 700; color: var(--text); }
.article-meta { font-size: 12px; color: var(--text3); margin: 4px 0 8px; }
.article-content { font-size: 14px; color: var(--text2); line-height: 1.8; word-break: break-word; }
.hotwords { display: flex; flex-direction: column; gap: 2px; }
.hotword {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 8px; border-radius: 7px; font-size: 13px; color: var(--text2);
}
.hotword:hover { background: #f2f6ff; }
.hotword:first-child { color: var(--orange); }
.hw-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.hw-c { font-size: 11px; color: var(--text3); flex: none; }
.side-guide ul { list-style: none; }
.side-guide li { font-size: 13px; color: var(--text2); padding: 4px 0; }
.side-guide li::before { content: "·"; color: var(--primary); font-weight: 700; margin-right: 8px; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; gap: 6px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pg {
    min-width: 34px; height: 34px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 8px; color: var(--text2); font-size: 13px;
    border: 1px solid var(--border);
}
.pg:hover { color: var(--primary); border-color: var(--primary); }
.pg.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pg-dots { color: var(--text3); align-self: center; }

/* ---------------- 详情页 ---------------- */
.detail-wrap { max-width: 760px; margin: 0 auto; }
.crumb { font-size: 13px; color: var(--text3); margin-bottom: 12px; padding-left: 4px; }
.crumb span { margin: 0 8px; }
.crumb a { color: var(--text2); }
.crumb a:hover { color: var(--primary); }

.detail-post { padding: 20px 22px; margin-bottom: 14px; }
.detail-content { font-size: 15.5px; line-height: 1.8; word-break: break-word; margin-top: 4px; }
.detail-imgs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.detail-imgs img {
    max-width: 200px; max-height: 200px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--border);
}
.detail-foot { margin-top: 16px; padding-top: 13px; border-top: 1px dashed #eef0f4; }
.big-like {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--border); border-radius: 20px;
    padding: 7px 18px; font-size: 14px; color: var(--text2);
}
.big-like:hover { border-color: var(--primary); color: var(--primary); }
.big-like.liked { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 700; }

/* 回复区 */
.reply-panel { padding: 20px 22px; }
.reply-title { font-size: 16px; margin-bottom: 16px; }
.reply-list { display: flex; flex-direction: column; gap: 2px; }
.reply-empty { text-align: center; color: var(--text3); padding: 30px 0; }
.reply-item { display: flex; gap: 10px; padding: 13px 10px; border-radius: 8px; }
.reply-item:hover { background: #f8f9fc; }
.reply-item.official { background: #f2f7ff; }
.reply-item.official:hover { background: #e8f1ff; }
.reply-body { min-width: 0; flex: 1; }
.reply-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reply-user { font-size: 13px; font-weight: 600; }
.official-badge {
    background: var(--primary); color: #fff;
    font-size: 11px; padding: 1px 7px; border-radius: 4px;
}
.reply-time { font-size: 12px; color: var(--text3); }
.reply-txt { font-size: 14px; color: var(--text); word-break: break-word; margin-top: 3px; }

.reply-form { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.reply-form textarea {
    flex: 1; min-width: 200px; min-height: 72px;
    border: 1px solid #dfe3ea; border-radius: 8px;
    padding: 10px 12px; font-size: 14px; font-family: inherit;
    outline: none; resize: vertical;
}
.reply-form textarea:focus { border-color: var(--primary); }
.reply-form-foot { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.reply-form-foot .tip { font-size: 12px; color: var(--text3); margin-right: auto; }
.reply-login { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 20px; text-align: center; color: var(--text3); }

/* ---------------- 发表页 ---------------- */
.post-wrap { max-width: 720px; margin: 0 auto; }
.post-card { padding: 22px 24px; }
.post-hd { display: flex; gap: 12px; margin-bottom: 18px; }
.post-user { font-size: 15px; font-weight: 600; }
.post-tip { font-size: 12.5px; color: var(--text3); margin-top: 2px; }
.post-textarea {
    width: 100%; min-height: 160px;
    border: 1px solid #dfe3ea; border-radius: 10px;
    padding: 14px; font-size: 15px; font-family: inherit;
    outline: none; resize: vertical;
}
.post-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 82, 217, .08); }
.post-count { text-align: right; font-size: 12px; color: var(--text3); margin: 6px 2px 0; }
.post-field { margin-top: 18px; }
.post-field > label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 8px; font-weight: 600; }
.post-field input[type=text] {
    width: 100%; border: 1px solid #dfe3ea; border-radius: 8px;
    padding: 10px 12px; font-size: 14px; outline: none;
}
.post-field input[type=text]:focus { border-color: var(--primary); }
.tag-quick { margin-top: 9px; display: flex; gap: 7px; flex-wrap: wrap; }

/* 图片上传 */
.upload-area { display: flex; gap: 9px; flex-wrap: wrap; }
.preview-box { display: contents; }
.upload-item { position: relative; width: 86px; height: 86px; }
.upload-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.upload-del {
    position: absolute; top: -7px; right: -7px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(26, 34, 51, .75); color: #fff;
    border: 0; font-size: 12px; line-height: 20px; text-align: center;
    cursor: pointer; padding: 0;
}
.upload-btn {
    width: 86px; height: 86px; border: 1.5px dashed #c6ccd8;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: var(--text3); cursor: pointer; flex: none;
    -webkit-box-pack: center;
}
.upload-btn:hover { border-color: var(--primary); color: var(--primary); }

.post-foot { margin-top: 22px; display: flex; justify-content: flex-end; gap: 12px; }

/* ---------------- 登录注册 ---------------- */
.auth-wrap { max-width: 400px; margin: 40px auto 0; }
.auth-card { padding: 30px 28px; }
.auth-title { font-size: 19px; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card input[type=text], .auth-card input[type=password] {
    width: 100%; border: 1px solid #dfe3ea; border-radius: 8px;
    padding: 11px 13px; font-size: 14px; outline: none;
}
.auth-card input:focus { border-color: var(--primary); }
.auth-links { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text3); }
.auth-links .sep { margin: 0 8px; }

.form-err {
    background: #fdecee; color: var(--red);
    padding: 9px 13px; border-radius: 8px;
    font-size: 13px; margin-bottom: 14px;
}

.msg-ok {
    background: #e8f7ef; color: #00a870;
    padding: 9px 13px; border-radius: 8px;
    font-size: 13px; margin-bottom: 14px;
}

/* ---------------- 头像图片 ---------------- */
.avatar-has-img img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block; border-radius: 50%;
}

/* ---------------- 个人中心 ---------------- */
.profile-card { padding: 24px 26px; margin-bottom: 16px; }
.profile-hd { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.profile-name { font-size: 17px; font-weight: 600; }
.profile-sub { font-size: 12px; color: var(--text3); margin-top: 3px; }

.sec-title { font-size: 15px; margin: 20px 0 16px; }

.profile-avatar-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.avatar-preview {
    width: 72px; height: 72px; line-height: 72px; font-size: 30px;
    background: var(--primary); flex: none; overflow: hidden;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar-ops { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.avatar-pick-btn { position: relative; cursor: pointer; }
.avatar-ops .stip { flex-basis: 100%; margin: 0; }

.profile-field { margin-bottom: 16px; }
.profile-field label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 7px; font-weight: 500; }
.stip-inline { color: var(--text3); font-weight: 400; font-size: 12px; }
.profile-field input[type=text], .profile-field input[type=password] {
    width: 100%; max-width: 420px; border: 1px solid #dfe3ea; border-radius: 8px;
    padding: 10px 13px; font-size: 14px; outline: none;
    box-sizing: border-box; -webkit-box-sizing: border-box;
}
.profile-field input:focus { border-color: var(--primary); }

.profile-foot { margin-top: 22px; display: flex; justify-content: flex-start; gap: 12px; }

/* ---------------- 顶栏退出链接 ---------------- */
.logout-link { font-size: 13px; color: var(--text3); }
.logout-link:hover { color: var(--red); }


/* ---------------- 底部 ---------------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: #fff; padding: 22px 0 26px;
    text-align: center; font-size: 13px; color: var(--text3);
}
.site-footer .container { padding: 0 16px; }
.site-footer p { margin-bottom: 4px; }
.site-footer .copy { font-size: 12px; }
.site-footer .icp-link { color: var(--text3); }
.site-footer .icp-link:hover { color: var(--text2); }

/* ---------------- 响应式（移动端） ---------------- */
@media (max-width: 860px) {
    .layout { display: block; }
    .side { width: 100%; position: static; margin-top: 16px; }
    .topbar-in { gap: 10px; height: 52px; }
    .brand-name { display: none; }
    .top-menu { gap: 0; }
    .tmenu { padding: 6px 9px; font-size: 13px; }
    .top-search { display: none; }
    .btn-new { padding: 7px 12px; font-size: 13px; }
    .tabs { position: sticky; top: 52px; z-index: 90; }
    .fb-item { padding: 14px; }
    .fb-imgs img, .img-more { width: 72px; height: 72px; }
    .act.view { display: none; }
    .detail-imgs img { max-width: 150px; max-height: 150px; }
    .post-card { padding: 16px; }
    .reply-item { padding: 11px 4px; }
}

@media (max-width: 480px) {
    body { font-size: 13.5px; }
    .user-name { display: none; }
    .fb-foot { gap: 14px; }
    .go-detail { display: none; }
}

/* X5 内核滚动修复 */
* { -webkit-box-sizing: border-box; }
.fb-list, .tabs, .hotwords { overflow: auto !important; }
