/* ============ 基础 ============ */
:root {
    --primary: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #e3f2fd;
    --bg: #f0f2f5;
    --text: #333;
    --muted: #888;
    --border: #e5e7eb;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: "Helvetica Neue", "Microsoft Yahei", sans-serif;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #e8f0ff 40%, #ffe8f0 100%); /* 中央纯白 + 外围蓝粉弥散 */
    background-size: 100% 100%;
    background-attachment: fixed; /* 移动端适配：背景固定于视口，防止滚动错位 */
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 104px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.page-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: #1976d2; z-index: 9999; transition: width .2s ease; }

/* ============ 顶部导航（横向大圆角胶囊卡片，扁平现代） ============ */
.topbar {
    position: sticky; top: 0; z-index: 90;   /* 贴住顶部，与最顶部接在一起 */
    padding: 0;   /* 全宽，无左右留白 */
}
.topbar-inner {
    position: relative;   /* 定位参照，供 logo 绝对居中 */
    display: flex; align-items: center; gap: 12px;
    height: 80px; padding: 0 16px;
    max-width: none;   /* 全宽，覆盖 .container 的 1000px 限制 */
    background: rgba(235, 245, 255, 0.86);   /* 浅蓝磨砂玻璃 */
    backdrop-filter: blur(9px) saturate(140%);   /* 细微磨砂 */
    -webkit-backdrop-filter: blur(9px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.72);   /* 玻璃高光描边 */
    border-radius: 0 0 24px 24px;            /* 只有下部圆角 */
    box-shadow: 0 4px 14px rgba(80, 150, 230, 0.12);   /* 轻微悬浮投影 */
}
.top-spacer { flex: 1; }
/* 正方形大圆角深蓝按钮（汉堡 / 我） */
.top-btn {
    width: 44px; height: 44px; flex-shrink: 0; padding: 0;
    background: #2b69cc; color: #fff;          /* 深蓝底白字 */
    border: none; border-radius: 14px;         /* 大圆角正方形 */
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; line-height: 1; cursor: pointer;
    text-decoration: none; font-family: inherit; transition: background .15s;
    box-shadow: 0 2px 8px rgba(43, 105, 204, 0.18);
}
.top-btn:hover { background: #2254a8; color: #fff; }
.top-brand {
    display: flex; align-items: center; gap: 4px;
    flex-shrink: 0; margin-left: -16px;   /* 靠左 */
}
.top-logo {
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.top-brand-text { display: flex; flex-direction: column; gap: 4px; }
.top-sitename {
    color: #2b8cff; font-size: 18px; font-weight: 700;   /* 亮蓝色标题 */
    line-height: 1; white-space: nowrap;
}
.top-goldline {
    width: 100%; height: 2px;                            /* 横线宽度跟随网站名称 */
    background: linear-gradient(90deg, #f5c518, #d4a017);
    -webkit-clip-path: polygon(0% 50%, 50% 0%, 100% 50%, 50% 100%);  /* 两端尖锐（梭形） */
    clip-path: polygon(0% 50%, 50% 0%, 100% 50%, 50% 100%);
}
.top-logo img { height: 69px; width: 233px; object-fit: contain; display: block; }
/* 无底色深蓝大号文字 */
.top-text {
    color: #4096ff; font-size: 16px; font-weight: 500;
    padding: 8px 10px; border-radius: 12px; text-decoration: none;
    white-space: nowrap; transition: background .15s, color .15s;
}
.top-text:hover { background: rgba(64, 150, 255, 0.1); color: #2b69cc; }
.top-text.active { font-weight: 700; color: #2b69cc; }
.top-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
/* 胶囊圆角长方形深蓝按钮（论坛） */
.top-pill {
    background: #2b69cc; color: #fff;          /* 深蓝底白字 */
    border-radius: 999px; padding: 8px 20px;   /* 胶囊 */
    font-size: 15px; font-weight: 600; text-decoration: none;
    white-space: nowrap; flex-shrink: 0; transition: background .15s;
    box-shadow: 0 2px 8px rgba(43, 105, 204, 0.18);
}
.top-pill:hover { background: #2254a8; color: #fff; }
.menu-wrap { position: relative; flex-shrink: 0; }
.menu-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 120;
    min-width: 140px; padding: 6px;
    background: #fff;   /* 纯白扁平 */
    border: 1px solid #ececec;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
    display: none; flex-direction: column;
}
.menu-dropdown.open { display: flex; }
.menu-dropdown a {
    display: block; padding: 10px 14px; border-radius: 10px;
    color: #0a4d7f; font-size: 14px; text-decoration: none;
}
.menu-dropdown a:hover { background: rgba(25, 118, 210, .08); }

/* 手机端：收紧顶部栏 */
@media (max-width: 600px) {
    .topbar-inner { gap: 8px; padding: 0 12px; height: 66px; border-radius: 0 0 20px 20px; }
    .top-btn { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
    .top-text { font-size: 15px; padding: 8px 6px; }
    .top-pill { padding: 7px 14px; font-size: 14px; }
    .top-logo img { height: 69px; width: 233px; max-width: 40vw; }
    .top-sitename { font-size: 16px; }
}
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row input { flex: 1; }
.captcha-row img { height: 40px; cursor: pointer; border-radius: 6px; }

/* ============ 卡片 ============ */
.card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05); /* 柔和低浓度阴影，粘土质感 */
}
.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-title .more { font-size: 13px; font-weight: normal; }

/* ============ 消息卡片（notice 页）：消除底部伪分割线 ============ */
/* .card 是前台通用卡片，消息页卡片底部那条 1px 浅灰边框（#ececec）在高清屏上
   会被渲染成虚的伪分割线。此处仅覆盖消息卡片，不动其他复用 .card 的组件。 */
.notice-card {
    overflow: hidden;   /* 圆角容器裁剪内部溢出，防止内容泄露产生细线条 */
    border: none;       /* 移除 1px 浅灰边框，消除底部多余细线 + 高清屏 1px 虚边 */
    padding: 21px;      /* 20px 原内边距 + 1px 边框补偿，卡片整体尺寸与内容位置维持不变 */
}

/* ============ 轮播图 ============ */
.banner { position: relative; border-radius: 12px; overflow: hidden; margin: 14px 0; background: #e9ecef; }
.banner-inner { position: relative; height: 260px; }
.banner-item { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
.banner-item.on { opacity: 1; }
.banner-item img { width: 100%; height: 260px; object-fit: cover; display: block; }
.banner-placeholder {
    width: 100%; height: 260px; display: flex; align-items: center; justify-content: center;
    background: #1976d2; color: #fff; font-size: 26px; font-weight: bold; /* 纯色，无渐变 */
}
.banner-dots { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; }
.banner-dots .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); margin: 0 4px; }
.banner-dots .dot.on { background: #fff; }

/* ============ 跑马灯 ============ */
.marquee { position: relative; margin: 14px auto; padding: 4px; overflow: visible; }
.marquee-inner { position: relative; display: flex; align-items: center; width: 100%; overflow: hidden; }
.marquee-clip { flex: 1; margin-left: 64px; overflow: hidden; min-width: 0; }
.marquee-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: marquee-scroll linear infinite; }
.marquee-item { display: inline-flex; align-items: center; margin-right: 3rem; }
.marquee-item a { color: inherit; }
.marquee-img { height: 1.6em; width: auto; margin-right: .4rem; vertical-align: middle; }
.marquee-notice { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); height: 3.3em; width: auto; z-index: 3; }
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ============ 启动公告弹窗（独立模态组件） ============ */
/* 跑马灯可点击：手型 + 禁止选中文字 */
.marquee { cursor: pointer; user-select: none; -webkit-user-select: none; }

.notice-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.notice-modal.show { display: flex; }
.notice-modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); } /* 半透明黑遮罩，点击不关闭 */
.notice-modal-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 360px;
    background: #fff; border-radius: 20px;
    padding: 24px 20px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    animation: notice-in .25s ease-out;
}
@keyframes notice-in {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.notice-modal-head { display: flex; align-items: center; gap: 12px; }
.notice-modal-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; flex-shrink: 0; }
.notice-modal-logo-fallback {
    width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0;
    background: #2b69cc; color: #fff; font-size: 26px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.notice-modal-titlebox { flex: 1; min-width: 0; }
.notice-modal-title { font-size: 18px; font-weight: 700; color: #1f2329; line-height: 1.3; }
.notice-modal-sub { font-size: 12px; color: #98a1b3; letter-spacing: 1px; margin-top: 2px; }
.notice-modal-line { height: 1px; background: #f0f1f5; margin: 16px 0; }
.notice-modal-body { font-size: 14px; color: #333; line-height: 1.8; }
.notice-modal-body p { margin: 0 0 4px; }
.notice-hl { color: #2a82e5; font-weight: 600; }
.notice-modal-sign { text-align: right; margin-top: 16px; }
.notice-sign-team { font-size: 15px; font-weight: 700; color: #1f2329; }
.notice-sign-time { font-size: 12px; color: #98a1b3; margin-top: 2px; }
.notice-modal-btn {
    display: block; width: 100%; margin-top: 20px;
    border: none; cursor: pointer; height: 44px;
    border-radius: 999px; background: #2b69cc; color: #fff;
    font-size: 15px; font-weight: 600; transition: background .15s;
}
.notice-modal-btn:hover { background: #2254a8; }

/* ============ 导航卡片 ============ */
.navcards { background: #fff; border: 1px solid #ececec; border-radius: 18px; padding: 20px; margin: 16px 0; box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.navcard-group { margin-bottom: 14px; }
.navcard-group:last-child { margin-bottom: 0; }
.navcard-cate { font-size: 15px; color: var(--primary); margin-bottom: 10px; }
.navcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.navcard {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 8px 4px;
    aspect-ratio: 1;
    border-radius: 12px;
    background: rgba(240,242,245,0.5);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(0,0,0,0.05);
    color: var(--text);
    transition: background .2s;
}
.navcard:hover { background: rgba(228,231,236,0.7); }
.navcard img { width: 32px; height: 32px; object-fit: cover; border-radius: 10px; }
.navcard-ic { font-size: 26px; }
.navcard-name { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 帖子列表 ============ */
.post-list { display: flex; flex-direction: column; }
.post-item {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 10px; border-bottom: 1px solid #f0f0f0; border-radius: 10px; color: var(--text);
    transition: background .15s;
}
.post-item:hover { background: #fafafa; }
.post-item:last-child { border-bottom: none; }
.post-item:hover .post-title { color: var(--primary); }
.post-title { font-size: 15px; font-weight: 500; }
.post-meta { font-size: 12px; color: var(--muted); }
.tag-top { display: inline-block; background: #ff5722; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 3px; margin-right: 6px; }

/* ============ 帖子详情 ============ */
.post-detail .post-title { font-size: 20px; margin-bottom: 8px; }
.post-detail .post-meta { margin-bottom: 14px; }
.post-content { font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.reply-item { padding: 14px 10px; border-bottom: 1px solid #f0f0f0; border-radius: 10px; transition: background .15s; }
.reply-item:hover { background: #fafafa; }
.reply-item:last-child { border-bottom: none; }
.reply-head { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.reply-content { font-size: 14px; }

/* ============ 表单 ============ */
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 13px; color: var(--muted); }
.form input, .form select, .form textarea {
    padding: 11px 14px; border: 1px solid #e0e0e0; border-radius: 12px; font-size: 14px;
    font-family: inherit; width: 100%; background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04); /* 淡淡的软阴影 */
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(25,118,210,0.12); }
.form-inline { flex-direction: row; }

/* ============ 按钮 ============ */
.btn {
    display: inline-block; padding: 9px 18px; border: 1px solid #e0e0e0; border-radius: 12px;
    background: #fff; color: var(--text); font-size: 14px; cursor: pointer; text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* 柔和微弱阴影 */
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(25,118,210,0.25); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* 记住我复选框行（登录表单） */
.remember-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.remember-line input { width: auto; margin: 0; }

/* ============ 认证框 ============ */
.auth-box { max-width: 400px; margin: 40px auto; background: #fff; border: 1px solid #ececec; border-radius: 18px; padding: 28px; box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.auth-box h2 { text-align: center; margin-bottom: 18px; }
.error { background: #fee2e2; color: #dc2626; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 14px; }
.tip { font-size: 13px; color: var(--muted); text-align: center; margin-top: 12px; }
.empty, .empty-box { text-align: center; color: var(--muted); padding: 30px 0; }
.empty-box { font-size: 15px; }

/* ============ 底部导航栏（毛玻璃 Glassmorphism，中间圆弧缺口） ============ */
.tabbar {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; align-items: stretch;
    height: 72px; z-index: 100;
}
.tabbar::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: rgba(255, 255, 255, 0.82);   /* 淡蓝白粉毛玻璃 */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.9);   /* 顶部高光 */
    border-radius: 20px 20px 0 0;   /* 保持原圆角，不改动 */
    box-shadow: 0 -2px 16px rgba(60, 95, 170, 0.06);   /* 极轻弥散阴影 */
    -webkit-mask: radial-gradient(circle 42px at 50% 0, transparent 42px, #000 43px);
    mask: radial-gradient(circle 42px at 50% 0, transparent 42px, #000 43px);
}
.tabbar .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: #8a8f99; font-size: 11px; text-decoration: none;  /* 未选中灰色文字 */
    border-radius: 14px; padding: 8px 4px; margin: 6px 2px;  /* 圆角方块，留白供外框 */
    transition: color .2s, box-shadow .2s;
}
.tabbar .tab-icon { position: relative; display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease; }
.tabbar .tab-icon svg { width: 28px; height: 28px; }
.tabbar .tab-icon img { width: 28px; height: 28px; object-fit: contain; }
.tabbar .tab-name { line-height: 1; }
.tabbar .tab.active, .tabbar .tab:hover { color: #2a82e5; }  /* 激活/悬停亮蓝 */
.tabbar .tab.active { background: rgba(100, 180, 255, 0.15); }  /* 淡蓝透底 */
.tabbar .tab:focus, .tabbar .tab:active, .tabbar .tab-invite:focus, .tabbar .tab-invite:active { outline: none; }
.tabbar .tab:active .tab-icon { transform: scale(1.2); }
/* 数字角标 */
.tabbar .badge {
    position: absolute; top: -6px; right: -10px;
    min-width: 16px; height: 16px; border-radius: 8px;
    background: #ef4444; color: #fff; font-size: 10px; line-height: 16px;
    text-align: center; padding: 0 4px; font-style: normal;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
/* 中间悬浮凸起邀请按钮（正圆 72px，嵌在中间圆弧缺口） */
.tabbar .tab-slot { flex: 1; position: relative; }
.tabbar .tab-invite {
    position: absolute; left: 50%; top: 16px;
    transform: translate(-50%, -50%);
    width: 72px; height: 72px;
    /* 只显示抠图图标，去掉圆球（背景/描边/阴影/圆角裁切） */
    color: #333;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: bold; z-index: 10;
    text-decoration: none;
    animation: invite-breathe 2.5s ease-in-out infinite;   /* 呼吸动作 */
}
.tabbar .tab-invite img {
    width: 100%; height: 100%;
    object-fit: contain;   /* 完整显示抠图图标，不裁剪 */
}
@keyframes invite-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.08); }
}

/* ============ 导航栏管理行 ============ */
.nav-item-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f3f5; }
.nav-item-row:last-child { border-bottom: none; }
.nav-item-label { width: 60px; font-size: 14px; }

/* ============ 用户主页 ============ */
.user-head { text-align: center; padding: 30px 0 14px; }
.avatar-big {
    width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 10px;
}

/* ============ 上传行 ============ */
.upload-row { display: flex; gap: 8px; }
.upload-row input[type=text] { flex: 1; }

/* ============ 版块/工具栏 ============ */
.forum-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { padding: 7px 16px; border-radius: 20px; background: #fff; border: 1px solid #e0e0e0; color: var(--text); font-size: 13px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.chip-on, .chip:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.toolbar { display: flex; gap: 8px; margin: 8px 0 0; }
.toolbar .btn { padding: 6px 14px; font-size: 13px; border-radius: 10px; }

/* ============ 后台整体布局（左固定菜单 + 右主内容，flex） ============ */
.admin-body { padding-bottom: 0; background: #f7f7f7; } /* 后台无底部栏，清掉全局 body 内边距，浅灰背景 */
.admin-wrap { display: flex; } /* 整体 flex 布局 */

/* 左侧竖向导航菜单：深灰纯色、固定、内部可滚动、无图标纯文字 */
.admin-side {
    width: 240px; background: #2b2b2b; color: #fff; /* 深灰纯色，固定宽度 */
    padding: 24px 0; display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; height: 100vh; /* 固定在视口 */
    overflow-y: auto; /* 菜单过多时内部纵向滚动，不撑开页面 */
}
.admin-side .logo { padding: 0 24px 28px; font-size: 18px; font-weight: 700; color: #fff; }
.admin-side .side-group { padding: 22px 24px 8px; font-size: 12px; color: #8f8f8f; }
.admin-side a { display: block; margin: 3px 16px; padding: 12px 16px; border-radius: 14px; color: #d2d2d2; font-size: 14px; text-decoration: none; transition: background .15s, color .15s; }
.admin-side a:hover { background: #383838; color: #fff; }
.admin-side a.on { background: #ffffff; color: #2b2b2b; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.22); } /* 选中纯色高亮块 */
.admin-side .side-bottom { margin-top: auto; padding-top: 20px; border-top: 1px solid #3a3a3a; }
.admin-side .side-bottom a { color: #b5b5b5; }
.admin-side .side-close { display: none; }
.admin-mobile-bar { display: none; }
.admin-backdrop { display: none; }

/* 右侧主内容区：自适应，min-height 不写固定 height */
.admin-main { flex: 1; margin-left: 240px; min-height: 100vh; padding: 28px; min-width: 0; }
.admin-main h2 { font-size: 20px; margin-bottom: 18px; color: #333; }

/* 卡片：纯白 + 粘土柔和阴影 + 大圆角 */
.admin-body .card { background: #fff; border: none; border-radius: 20px; padding: 20px; margin: 16px 0; box-shadow: 0 8px 24px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.9); }
.admin-body .card-title { font-size: 16px; font-weight: 600; color: #333; }

/* 输入框/下拉/文本域：白底 + 内凹粘土阴影 + 圆角，无渐变无图标 */
.admin-body .form input, .admin-body .form select, .admin-body .form textarea { background: #fff; border: none; border-radius: 12px; padding: 11px 14px; font-size: 14px; box-shadow: inset 2px 2px 6px rgba(0,0,0,.05), inset -2px -2px 6px rgba(255,255,255,.95); }
.admin-body .form input:focus, .admin-body .form select:focus, .admin-body .form textarea:focus { outline: none; box-shadow: inset 2px 2px 6px rgba(0,0,0,.08), inset -2px -2px 6px rgba(255,255,255,.95), 0 0 0 2px #dcdcdc; }
.admin-body .form input[type=color], .admin-body .form input[type=file] { padding: 4px; box-shadow: none; border: 1px solid #e0e0e0; }

/* 按钮：纯色填充 + 粘土阴影 + 圆角，纯文字 */
.admin-body .btn { background: #fff; color: #333; border: none; border-radius: 12px; padding: 9px 18px; box-shadow: 0 4px 12px rgba(0,0,0,.08); cursor: pointer; }
.admin-body .btn:hover { box-shadow: 0 6px 16px rgba(0,0,0,.12); color: #333; }
.admin-body .btn-primary { background: #2b2b2b; color: #fff; border: none; }
.admin-body .btn-primary:hover { background: #3a3a3a; color: #fff; }
.admin-body .btn-danger { background: #c62828; color: #fff; border: none; }
.admin-body .btn-danger:hover { background: #b71c1c; color: #fff; }
.admin-body .btn-sm { padding: 6px 12px; font-size: 12px; }

/* 表格：白底、浅灰线、宽松行距，纯色无渐变 */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.9); }
.admin-table th, .admin-table td { padding: 16px 18px; border-bottom: 1px solid #f0f0f0; text-align: left; font-size: 14px; color: #333; }
.admin-table th { background: #fafafa; font-weight: 600; color: #666; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table img { width: 60px; height: 40px; object-fit: cover; border-radius: 10px; }

/* 仪表盘统计卡片（粘土风，纯色） */
.stat-section { margin-bottom: 26px; }
.stat-section h3 { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #666; margin-bottom: 12px; font-weight: 600; }
.stat-section h3 .stat-more { font-size: 12px; font-weight: normal; color: #888; }
.stat-section h3 .stat-more:hover { color: #2b2b2b; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.stat-card { display: block; background: #fff; border: 1px solid #ececec; border-radius: 16px; padding: 18px; box-shadow: 0 8px 22px rgba(0,0,0,.07); text-decoration: none; color: #333; transition: transform .12s, box-shadow .12s; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.1); color: #333; }
.stat-card .num { font-size: 26px; font-weight: 700; color: #2b2b2b; line-height: 1.2; }
.stat-card .lbl { font-size: 13px; color: #888; margin-top: 6px; }
.chart-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 14px; }

/* 安装容器（纯色无渐变） */
.install-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f7f7f7; }
.install-box { width: 400px; background: #fff; padding: 32px; border-radius: 20px; box-shadow: 0 12px 40px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.9); }
.install-box h2 { text-align: center; margin-bottom: 18px; color: #333; }
.install-box form { display: flex; flex-direction: column; gap: 10px; }
.install-box input { padding: 12px 14px; border: none; border-radius: 12px; background: #fff; box-shadow: inset 2px 2px 6px rgba(0,0,0,.05), inset -2px -2px 6px rgba(255,255,255,.95); font-size: 14px; }
.install-box button { padding: 12px; background: #2b2b2b; color: #fff; border: none; border-radius: 12px; cursor: pointer; font-size: 15px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.msg { margin-top: 14px; color: #2e7d32; font-size: 14px; }
.flash { background: #e6f4ea; color: #1e7e34; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; border: 1px solid #c6e6ce; }
.login-time { font-size: 12px; color: #8f8f8f; padding: 8px 16px 0; }

/* ============ 后台登录（粘土风，纯文字） ============ */
.admin-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; background: #f7f7f7; }
.admin-login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; box-shadow: 0 12px 40px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.9); padding: 40px 36px; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand h1 { font-size: 22px; color: #333; margin-bottom: 6px; }
.login-sub { font-size: 13px; color: #9a9a9a; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-form label { font-size: 13px; color: #666; }
.login-form input { padding: 12px 14px; border: none; border-radius: 12px; background: #fff; box-shadow: inset 2px 2px 6px rgba(0,0,0,.05), inset -2px -2px 6px rgba(255,255,255,.95); font-size: 14px; font-family: inherit; width: 100%; }
.login-form input:focus { outline: none; box-shadow: inset 2px 2px 6px rgba(0,0,0,.08), inset -2px -2px 6px rgba(255,255,255,.95), 0 0 0 2px #dcdcdc; }
.login-form button { margin-top: 6px; padding: 13px; border: none; border-radius: 12px; background: #2b2b2b; color: #fff; font-size: 15px; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.login-form button:hover { background: #3a3a3a; }

/* ============ 头像 ============ */
.avatar-sm { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-xs { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-text { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-style: normal; }
.avatar-sm.avatar-text { font-size: 12px; }
.avatar-xs.avatar-text { font-size: 10px; }
.avatar-big.avatar-text { background: var(--primary); color: #fff; }

/* ============ 链接按钮 ============ */
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ============ 点赞收藏 ============ */
.post-actions { margin-top: 14px; display: flex; gap: 8px; }

/* ============ 分页 ============ */
.pagination { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pagination a, .pagination .cur { padding: 7px 13px; border: 1px solid #e0e0e0; border-radius: 10px; background: #fff; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.pagination .cur { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ 次要文字 ============ */
.muted { color: var(--muted); font-size: 12px; font-weight: normal; margin-left: 8px; }

/* ============ 头像上传表单 ============ */
.avatar-form { margin-top: 8px; }

/* ============ 响应式 ============ */
@media (max-width: 600px) {
    .banner-inner, .banner-item img, .banner-placeholder { height: 160px; }
    .navcard-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============ 后台手机端（抽屉式侧栏） ============ */
@media (max-width: 768px) {
    .admin-wrap { display: block; }
    .admin-mobile-bar {
        display: flex; align-items: center; gap: 12px;
        position: sticky; top: 0; z-index: 150;
        height: 54px; padding: 0 16px;
        background: #2b2b2b; color: #fff;
    }
    .admin-mobile-bar .menu-btn {
        background: none; border: none; color: #fff; font-size: 22px;
        cursor: pointer; line-height: 1; padding: 4px;
    }
    .admin-mobile-bar .bar-title { font-size: 16px; font-weight: 600; }
    .admin-side {
        position: fixed; top: 0; left: 0;
        width: 260px; height: 100vh;
        transform: translateX(-100%);
        transition: transform .25s ease; z-index: 200;
    }
    .admin-side.open { transform: translateX(0); box-shadow: 0 0 24px rgba(0,0,0,.35); }
    .admin-side .logo { padding-right: 48px; }
    .admin-side .side-close {
        display: block; position: absolute; top: 8px; right: 14px;
        background: none; border: none; color: #c0c0c0;
        font-size: 26px; line-height: 1; cursor: pointer; padding: 4px;
    }
    .admin-backdrop {
        position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 190;
    }
    .admin-backdrop.show { display: block; }
    .admin-main { margin-left: 0; padding: 16px; }
    .install-box { max-width: calc(100% - 32px); }
    .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } /* 移动端表格横向滚动，避免溢出 */
    .admin-table th, .admin-table td { white-space: nowrap; }
}

/* ============ 最新帖子模块（新组件 postboard） ============ */
.postboard {
    background: #fff;                /* 白色大圆角容器 */
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,.05);
    overflow: hidden;                /* 内容不溢出 */
}

/* ① 顶部 Tab 导航栏 */
.pb-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pb-tabs-left { display: flex; align-items: center; gap: 8px; }
.pb-tab {
    border: none; background: transparent; cursor: pointer;
    color: #8b5cf6;                  /* 未激活：仅紫色文字 */
    font-size: 14px; font-weight: 500;
    padding: 6px 14px; border-radius: 10px;
    transition: background .15s, color .15s;
}
.pb-tab.on {
    background: #ede9fe;             /* 激活：淡紫底 */
    color: #7c3aed;                  /* 激活：紫字 */
    font-weight: 600;
}

/* 签到按钮：日历图标 + 浅紫边框圆角 */
.pb-sign {
    display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid #c4b5fd;       /* 浅紫边框 */
    background: #fff; color: #7c3aed;
    font-size: 13px; font-weight: 500;
    padding: 5px 12px; border-radius: 999px;
    cursor: pointer;
}
.pb-sign-ic { width: 14px; height: 14px; }

/* ② tab 下方浅灰分割线 */
.pb-divider { height: 1px; background: #f0f0f0; margin: 12px 0; }

/* ③ 帖子列表 */
.pb-list { display: flex; flex-direction: column; }

/* 单条帖子：横向布局 */
.pb-item {
    display: flex; align-items: center; gap: 8px;   /* 缩小头像与主体的间距，图标更靠左 */
    padding: 2px 0;   /* 上下留白最小化，列表更紧凑 */
    border-bottom: 1px solid #f5f5f5;
}
.pb-item:last-child { border-bottom: none; }

/* ① 头像 + 认证角标 */
/* 父容器：头像占位 44px（帖子布局不变），overflow 允许头像框装饰溢出 */
.pb-avatar { position: relative; width: 44px; height: 44px; flex-shrink: 0; overflow: visible; }
/* 底层：用户头像，44×44 圆形（保持不变） */
.pb-avatar img:not(.pb-frame) {
    width: 44px; height: 44px; border-radius: 50%;
    object-fit: cover; display: block; background: #eef2f7;
    position: relative; z-index: 1;
}
.pb-avatar-txt {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #eef2f7; color: #6b7a90; font-size: 18px;
    position: relative; z-index: 1;
}
.pb-verify {
    position: absolute; right: -2px; bottom: -2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #4c8dff; color: #fff;
    font-size: 10px; line-height: 16px; text-align: center;
    border: 2px solid #fff;
}
/* 上层：头像框图标放大（110×135），绝对定位居中于头像，装饰溢出环绕头像，不挡点击 */
.pb-frame {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 110px; height: 110px; /* 放大头像框（正方形 110×110），完整显示皇冠/翅膀/吊坠 */
    object-fit: contain;
    pointer-events: none;        /* 关键：防止头像框挡住点击头像 */
    z-index: 2;
    /* 组合动画：入场浮现(只播一次) + 缩放呼吸(循环) */
    animation:
        frame-enter 0.6s ease-out forwards,
        frame-breathe 2.5s ease-in-out 0.6s infinite;
}

/* ① 缓入浮现：从 0 淡入放大（只播一次，forwards 保持终态） */
@keyframes frame-enter {
    from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ② 缩放呼吸：轻微放大缩小 */
@keyframes frame-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.06); }
}
/* 有头像框的帖子：第一行（推荐图标等）右移，避开头像框右翅膀，避免重叠 */
.pb-item.has-frame .pb-line1 { margin-left: 24px; }

/* 主体 */
.pb-main { flex: 1; min-width: 0; }
/* ② 第一行：类型标签 + 置顶图标 + 标题 */
.pb-line1 { display: flex; align-items: center; gap: 4px; }
.pb-badge {
    background: #ef4444; color: #fff; /* 类型标签：红底白字 */
    font-size: 11px; padding: 1px 6px; border-radius: 4px;
    flex-shrink: 0; line-height: 1.4;
}
/* 推荐标签：头像右侧水平排列（flex 流内，不绝对定位、不覆盖头像） */
.pb-rec { height: 12px; width: auto; max-width: 40px; object-fit: contain; flex-shrink: 0; }

/* 置顶徽章：头像右侧水平排列（flex 流内） */
.pb-pin { height: 30px; width: auto; max-width: 90px; object-fit: contain; flex-shrink: 0; }
.pb-title {
    color: #000;                     /* 标题默认黑色（普通用户强制黑，过滤彩色） */
    font-size: 15px; font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;           /* 最多 4 行，显示更多标题内容 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pb-title-c-red { color: #ef4444; }  /* 管理帖子权限：红色标题 */
.pb-title-c-blue { color: #2563eb; } /* 管理帖子权限：蓝色标题 */
.pb-title:hover { text-decoration: underline; }
/* ③ 第二行：作者 · 时间 */
.pb-line2 { margin-top: 4px; color: #9aa4b2; font-size: 12px; }

/* ④ 右侧：评论 + 按钮 */
.pb-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.pb-reply { display: flex; align-items: center; gap: 4px; color: #9aa4b2; font-size: 12px; }
.pb-reply svg { width: 15px; height: 15px; }
.pb-btn {
    background: #ef4444; color: #fff; /* 按钮：红色圆角 */
    border: none; border-radius: 8px;
    font-size: 12px; padding: 4px 12px; cursor: pointer;
}

/* 空态 */
.pb-empty { padding: 20px 0; text-align: center; color: #9aa4b2; font-size: 14px; }

/* ============ 后台上传进度条 ============ */
.upload-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.up-track { flex: 1; height: 6px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.up-bar { display: block; height: 100%; width: 0; background: #4096ff; border-radius: 999px; transition: width .2s; }
.up-txt { font-size: 12px; color: #8a94a6; min-width: 36px; text-align: right; }

/* ============ 搜索模块按钮：去掉点击焦点虚影 ============ */
.btn-fn, #home-search-btn, #home-share-btn { outline: none; }
.btn-fn:focus, .btn-fn:active,
#home-search-btn:focus, #home-search-btn:active,
#home-share-btn:focus, #home-share-btn:active {
    outline: none;
    box-shadow: none;
}

/* ============ 富文本编辑器（发帖/编辑） ============ */
.editor-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 10px; background:#f8f9fb; border:1px solid #e5e7eb; border-radius:12px 12px 0 0; }
.editor-toolbar button { padding:5px 12px; border:1px solid #e0e0e0; background:#fff; border-radius:8px; cursor:pointer; font-size:13px; color:#333; }
.editor-toolbar button:hover { border-color:#4096ff; color:#4096ff; }
.editor-toolbar select { padding:5px 8px; border:1px solid #e0e0e0; border-radius:8px; font-size:13px; }
.editor-content { min-height:220px; padding:12px 14px; border:1px solid #e5e7eb; border-top:none; border-radius:0 0 12px 12px; font-size:15px; line-height:1.7; color:#333; outline:none; background:#fff; }
.editor-content:focus { border-color:#4096ff; }
.editor-content img { max-width:100%; height:auto; border-radius:8px; }
.pd-yellow-block { display:inline-block; background:linear-gradient(135deg,#fff8e1,#fde8b0); color:#8a6d1a; border-radius:12px; padding:10px 20px; font-size:15px; font-weight:700; text-decoration:none; cursor:pointer; box-shadow:0 4px 12px rgba(230,190,90,.25); transition:transform .15s, box-shadow .15s; }
.pd-yellow-block:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(230,190,90,.35); }
.pd-yellow-arrow { margin-left:6px; }
.pd-yellow-lock { background:linear-gradient(135deg,#fecaca,#fca5a5); color:#991b1b; }
.pd-yellow-open { background:linear-gradient(135deg,#d1fae5,#a7f3d0); color:#065f46; }

/* ============ 标题编辑器 ============ */
.title-row { display:flex; align-items:center; gap:8px; }
.title-row select { padding:8px; border:1px solid #e0e0e0; border-radius:8px; font-size:13px; }
.title-editor { flex:1; min-height:44px; padding:11px 14px; border:1px solid #e0e0e0; border-radius:12px; font-size:14px; font-family:inherit; background:#fff; outline:none; box-shadow:0 2px 6px rgba(0,0,0,0.04); white-space:nowrap; overflow:hidden; }
.title-editor:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(25,118,210,0.12); }
.title-editor:empty::before { content: attr(data-placeholder); color:#98a1b3; }

/* ============ 内联隐藏内容 ============ */
.editor-content .hidden-block { border:1px dashed #22c55e; background:#f0fdf4; padding:2px 6px; border-radius:6px; }
.hidden-lock {
    background:#fff;
    border:2px dashed #22c55e;
    border-radius:20px;
    margin:16px 0;
    padding:32px 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}
.hidden-lock-icon {
    width:20px; height:20px; border-radius:50%;
    background:#22c55e; color:#fff;
    display:inline-flex; align-items:center; justify-content:center;
    font-size:14px; font-weight:700; font-style:normal; line-height:1;
}
.hidden-lock-text { color:#16a34a; font-size:15px; }
