/* =====================================================
   次元控论坛 - 全站统一样式
   风格：二次元蓝紫青（男女通用）
   ===================================================== */

:root {
    --primary: #4f7cff;
    --primary-deep: #3b5bdb;
    --secondary: #7c5cfc;
    --accent: #22b8cf;
    --grad: linear-gradient(135deg, #4f7cff 0%, #7c5cfc 100%);
    --grad-btn: linear-gradient(135deg, #4f7cff 0%, #7c5cfc 100%);
    --text: #323749;
    --text-light: #7d849b;
    --text-lighter: #aeb4c8;
    --bg: #f4f6fb;
    --card: #ffffff;
    --border: #e5eaf4;
    --soft-bg: #eef3ff;      /* 主色浅底（原粉底） */
    --soft2-bg: #f2efff;     /* 紫色浅底 */
    --danger: #ef4d5e;
    --success: #2fb986;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 6px 24px rgba(80, 100, 200, .10);
    --shadow-hover: 0 10px 32px rgba(80, 100, 200, .20);
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    /* 兼容旧变量名（历史内联引用） */
    --pink-bg: #eef3ff;
    --purple-bg: #f2efff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 600px 300px at 8% -5%, rgba(79, 124, 255, .10), transparent),
        radial-gradient(ellipse 600px 300px at 95% 0%, rgba(124, 92, 252, .10), transparent);
    background-attachment: fixed;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.7;
}

a { color: var(--primary-deep); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }
img { max-width: 100%; vertical-align: middle; }

/* PC 限宽容器 */
.container { width: min(1100px, 94%); margin: 0 auto; }
.container-narrow { width: min(780px, 94%); margin: 0 auto; }

/* ============ 顶栏 ============ */
.topbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo {
    display: flex; align-items: center; gap: 9px;
    font-size: 20px; font-weight: 800; letter-spacing: 1px;
    white-space: nowrap; color: var(--primary-deep);
    flex-shrink: 0;
}
.logo-mark {
    width: 33px; height: 33px; border-radius: 11px;
    background: var(--grad);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; font-weight: 800;
    box-shadow: 0 4px 12px rgba(79, 124, 255, .4);
}
.logo .logo-text {
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
    padding: 7px 14px; border-radius: 999px;
    color: var(--text); font-weight: 500; font-size: 14px; transition: all .2s;
    white-space: nowrap; flex-shrink: 0;
}
.nav-links a:hover { background: var(--soft-bg); color: var(--primary-deep); }
.nav-links a.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(79, 124, 255, .35); }

.nav-user { display: flex; align-items: center; gap: 10px; white-space: nowrap; flex-shrink: 0; }
.nav-points { color: var(--secondary); font-weight: 700; font-size: 13px; }
.nav-notice { position: relative; color: var(--text-light); font-size: 13px; padding: 5px 8px; }
.nav-notice .dot {
    position: absolute; top: -2px; right: -4px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--danger); color: #fff;
    border-radius: 999px; font-size: 11px; line-height: 16px;
    text-align: center; font-weight: 700;
}
.nav-search { display: flex; }
.nav-search input {
    width: 168px; padding: 7px 14px;
    border: 1.5px solid var(--border); border-right: none;
    border-radius: 999px 0 0 999px;
    font-size: 13px; outline: none; background: #fbfcfe;
    transition: border-color .2s; font-family: var(--font);
}
.nav-search input:focus { border-color: var(--primary); }
.nav-search button {
    padding: 7px 16px; border: none; cursor: pointer;
    border-radius: 0 999px 999px 0;
    background: var(--grad-btn); color: #fff; font-size: 13px;
    font-family: var(--font); transition: opacity .2s;
}
.nav-search button:hover { opacity: .88; }

/* ============ 英雄区 ============ */
.hero {
    margin-top: 22px; border-radius: 22px;
    background: linear-gradient(135deg, #1b2340 0%, #31418a 55%, #6a4fb3 100%);
    color: #fff; padding: 42px 46px;
    position: relative; overflow: hidden;
    box-shadow: 0 14px 40px rgba(43, 55, 110, .35);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        radial-gradient(circle 220px at 85% 20%, rgba(79, 124, 255, .4), transparent),
        radial-gradient(circle 260px at 95% 90%, rgba(34, 184, 207, .25), transparent);
}
.hero-grid {
    position: absolute; inset: 0; opacity: .10;
    background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
    background-size: 34px 34px;
}
.hero-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.hero h1 { font-size: 28px; letter-spacing: 2px; font-weight: 800; }
.hero h1 span {
    background: linear-gradient(90deg, #8fb4ff, #c3b1ff);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { margin-top: 10px; color: rgba(255, 255, 255, .75); font-size: 14px; }
.hero-cta { display: flex; gap: 12px; flex-shrink: 0; }

/* ============ 按钮（全站统一） ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 24px; border: none; border-radius: 999px; cursor: pointer;
    font-family: var(--font); font-size: 14px; font-weight: 600;
    transition: all .22s; line-height: 1.4; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
    background: var(--grad-btn); color: #fff;
    box-shadow: 0 5px 16px rgba(79, 124, 255, .4);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(79, 124, 255, .55);
    color: #fff;
}
.btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .28); color: #fff; }
.btn-plain { background: #fff; color: var(--primary-deep); border: 1.5px solid var(--border); }
.btn-plain:hover:not(:disabled) { border-color: var(--primary); background: var(--soft-bg); color: var(--primary-deep); }
.btn-danger { background: linear-gradient(135deg, #ff7a8a, #ef4d5e); color: #fff; box-shadow: 0 5px 14px rgba(239, 77, 94, .35); }
.btn-danger:hover:not(:disabled) { transform: translateY(-2px); color: #fff; }
.btn-sm { padding: 4px 14px; font-size: 12.5px; box-shadow: none; }
.btn-block { width: 100%; }
.btn-like.liked { border-color: var(--primary); color: var(--primary-deep); background: var(--soft-bg); }

/* ============ 表单（全站统一） ============ */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 13.5px; }
.form-group label .req { color: var(--primary-deep); margin-left: 3px; }
.form-group input[type="text"], .form-group input[type="password"],
.form-group input[type="tel"], .form-group input[type="number"],
.form-group input[type="file"], .form-group textarea, .form-group select {
    width: 100%; padding: 10px 15px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-family: var(--font); color: var(--text);
    background: #fbfcfe; outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none; appearance: none;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, .15);
    background: #fff;
}
.form-tip { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.form-tip .got { color: var(--success); font-weight: 600; }
.form-tip .miss { color: var(--primary-deep); font-weight: 600; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row img { border-radius: var(--radius-sm); border: 1.5px solid var(--border); height: 44px; cursor: pointer; flex-shrink: 0; }

/* ============ 卡片 ============ */
.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-top: 22px; overflow: hidden;
}
.card-h {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 22px; border-bottom: 1px solid var(--border);
    gap: 10px; flex-wrap: wrap;
}
.card-h h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-h h2::before {
    content: ""; width: 4px; height: 17px; border-radius: 4px; flex-shrink: 0;
    background: linear-gradient(180deg, #4f7cff, #7c5cfc);
}
.card-h .more { font-size: 13px; color: var(--text-light); font-weight: 400; }
.card-b { padding: 20px 22px; }
.card-b.tight { padding: 0; }

/* ============ 首页布局 ============ */
.home-cols { display: flex; gap: 22px; margin-top: 22px; align-items: flex-start; }
.home-main { flex: 1; min-width: 0; }
.home-side { width: 300px; flex-shrink: 0; }
.section-title {
    margin: 28px 0 -8px; font-size: 15px; font-weight: 800;
    display: flex; align-items: center; gap: 8px;
}
.section-title:first-child { margin-top: 0; }
.section-title .sec-deco { color: var(--primary); }

/* ============ 版块列表 ============ */
.board-item {
    display: flex; gap: 16px; align-items: center;
    padding: 18px 22px; border-bottom: 1px solid var(--border);
    transition: background .2s;
}
.board-item:last-child { border-bottom: none; }
.board-item:hover { background: linear-gradient(90deg, rgba(238, 243, 255, .8), transparent); }
.board-icon {
    width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 25px;
    background: linear-gradient(135deg, #eef3ff, #f2efff);
    border: 1px solid var(--border);
}
.board-main { flex: 1; min-width: 0; }
.board-main .b-name { font-size: 15.5px; font-weight: 700; }
.board-main .b-desc { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }
.board-stats { text-align: right; flex-shrink: 0; }
.board-stats .nums { font-size: 12px; color: var(--text-light); }
.board-stats .nums b { color: var(--secondary); }
.board-last { font-size: 12px; color: var(--text-light); margin-top: 3px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 统计网格 ============ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
    background: linear-gradient(135deg, #eef3ff, #f2efff);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px 10px; text-align: center;
}
.stat .num { font-size: 21px; font-weight: 800; color: var(--primary-deep); }
.stat .lbl { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* ============ 签到挂件 ============ */
.signin-box { text-align: center; }
.signin-box .day { font-size: 12.5px; color: var(--text-light); margin-top: 8px; }
.signin-done {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--success); font-weight: 700; padding: 8px 20px;
    background: rgba(47, 185, 134, .1); border-radius: 999px; font-size: 13.5px;
}

/* ============ 徽章 / 标签 ============ */
.badge {
    display: inline-block; padding: 1px 9px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; line-height: 1.7;
    vertical-align: 2px; white-space: nowrap;
}
.badge-admin { background: linear-gradient(135deg, #ff9f43, #ff6b6b); color: #fff; }
.badge-supermod { background: linear-gradient(135deg, #7c5cfc, #5f3dc4); color: #fff; }
.badge-mod { background: linear-gradient(135deg, #22b8cf, #3b82f6); color: #fff; }
.badge-member { background: var(--soft2-bg); color: var(--secondary); }
.badge-banned { background: #ffe4e8; color: var(--danger); }
.tag {
    display: inline-block; padding: 0 8px; margin-right: 6px;
    border-radius: 5px; font-size: 11.5px; font-weight: 700;
    line-height: 1.8; vertical-align: 2px;
}
.tag-sticky { background: #fff3d6; color: #d48806; }
.tag-essence { background: linear-gradient(135deg, #4f7cff, #7c5cfc); color: #fff; }
.tag-lock { background: #e8ebf3; color: var(--text-light); }
.tag-closed { background: #e8ebf3; color: var(--text-light); }

/* ============ 头像 ============ */
.avatar { border-radius: 50%; object-fit: cover; background: var(--soft2-bg); }
.avatar-sm { width: 30px; height: 30px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 96px; height: 96px; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(80,100,200,.25); }

/* ============ 主题列表 ============ */
.thread-item {
    display: flex; gap: 14px; padding: 15px 22px;
    border-bottom: 1px solid var(--border); align-items: flex-start;
    transition: background .2s;
}
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: linear-gradient(90deg, rgba(242, 239, 255, .6), transparent); }
.thread-item .t-main { flex: 1; min-width: 0; }
.thread-item .t-title {
    font-size: 15px; font-weight: 600; color: var(--text);
    display: block; margin-bottom: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread-item .t-title:hover { color: var(--primary-deep); }
.thread-item .t-title:visited { color: var(--text-light); }
.thread-item .t-meta { font-size: 12px; color: var(--text-light); }
.thread-item .t-meta a { color: var(--text-light); }
.thread-item .t-meta a:hover { color: var(--primary-deep); }
.thread-item .t-right { text-align: right; flex-shrink: 0; font-size: 12px; color: var(--text-light); }
.thread-item .t-right .cnt b { color: var(--secondary); font-size: 14px; }
.sticky-item { background: linear-gradient(90deg, rgba(255, 243, 214, .45), transparent); }

/* ============ 帖子（主题详情页） ============ */
.thread-title-bar {
    padding: 22px 26px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(circle at 92% -30%, rgba(155,110,243,.16), transparent 55%),
        radial-gradient(circle at 0% 130%, rgba(79,124,255,.12), transparent 50%),
        linear-gradient(135deg, #f7f9ff, #f4f1fd);
}
.thread-title-bar h1 { font-size: 21px; font-weight: 800; line-height: 1.5; letter-spacing: .3px; }
.thread-title-bar .t-meta { font-size: 12.5px; color: var(--text-light); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.thread-title-bar .t-meta a { color: var(--primary-deep); font-weight: 600; }
.thread-title-bar .t-meta a:hover { text-decoration: underline; }

.post {
    display: flex; gap: 18px; padding: 22px;
    border-bottom: 1px solid var(--border);
    transition: background .2s;
    position: relative;
}
.post:last-child { border-bottom: none; }
.post:hover { background: #fafbff; }
.post-aside {
    width: 132px; flex-shrink: 0; text-align: center;
    background: linear-gradient(180deg, #f8faff, #f2f5ff);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 8px 12px;
    align-self: flex-start;
}
.post-aside .avatar {
    width: 68px; height: 68px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--primary), 0 4px 12px rgba(79,124,255,.25);
    transition: transform .2s;
}
.post-aside:hover .avatar { transform: scale(1.06) rotate(3deg); }
.post-aside .uname { font-weight: 700; margin-top: 8px; font-size: 13.5px; }
.post-aside .uname a:hover { color: var(--primary-deep); }
.post-aside .u-title {
    font-size: 11.5px; color: var(--primary-deep); margin-top: 4px;
    display: inline-block;
    padding: 2px 10px;
    background: rgba(79,124,255,.1);
    border-radius: 999px;
}
.post-aside .u-stats { font-size: 11px; color: var(--text-lighter); margin-top: 5px; }
.post-main { flex: 1; min-width: 0; }
.post-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px dashed var(--border);
    font-size: 12px; color: var(--text-light);
}
.post-floor {
    font-weight: 700; font-size: 11.5px; color: var(--primary-deep);
    background: rgba(79,124,255,.1);
    padding: 2px 12px; border-radius: 999px;
}
.post-body { font-size: 14.5px; word-break: break-word; line-height: 1.8; }
.post-foot { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.quote-box {
    border-left: 3px solid var(--primary);
    background: var(--soft-bg);
    padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 6px 0; color: var(--text-light); font-size: 13px;
}

/* ============ 通用小元素 ============ */
.empty { padding: 46px 20px; text-align: center; color: var(--text-lighter); }
.empty .deco { font-size: 34px; display: block; margin-bottom: 8px; }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 20px 10px 6px; flex-wrap: wrap; }
.pagination a, .pagination .pg-cur, .pagination .pg-ellipsis {
    padding: 5px 14px; border-radius: 999px; font-size: 13px;
    background: #fff; border: 1.5px solid var(--border); color: var(--text);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary-deep); }
.pagination .pg-cur { background: var(--grad-btn); border-color: transparent; color: #fff; font-weight: 700; }
.pagination .pg-ellipsis { border: none; background: none; }

.flash { margin-top: 16px; }
.flash-msg {
    padding: 11px 18px; border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 500;
    animation: fadeIn .3s;
}
.flash-success { background: rgba(47, 185, 134, .12); color: #1e9c6d; border: 1px solid rgba(47, 185, 134, .3); }
.flash-error { background: rgba(239, 77, 94, .1); color: var(--danger); border: 1px solid rgba(239, 77, 94, .3); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; } }

.kv { display: flex; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 110px; color: var(--text-light); flex-shrink: 0; }
.kv .v { flex: 1; word-break: break-all; }

/* ============ 侧栏列表 ============ */
.side-list { padding: 6px 0; }
.side-list a {
    display: flex; gap: 10px; align-items: center;
    padding: 9px 22px; color: var(--text); font-size: 13px;
    border-left: 3px solid transparent; transition: all .15s;
}
.side-list a:hover { background: var(--soft-bg); border-left-color: var(--primary); color: var(--primary-deep); }
.side-list .sl-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list .sl-time { font-size: 11.5px; color: var(--text-lighter); flex-shrink: 0; }

.announce-item { padding: 12px 22px; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.announce-item:last-child { border-bottom: none; }
.announce-item .a-title { font-weight: 700; }
.announce-item .a-time { font-size: 11.5px; color: var(--text-lighter); margin-left: 8px; }

/* ============ 页脚 ============ */
.footer { margin: 40px 0 26px; text-align: center; font-size: 12px; color: var(--text-lighter); padding: 0 16px; }
.footer .f-links { margin-bottom: 6px; }
.footer a { color: var(--text-light); margin: 0 8px; }

/* ============ 认证页（登录/注册） ============ */
.auth-wrap { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card {
    width: 420px; max-width: 100%;
    background: #fff; border-radius: 22px; box-shadow: var(--shadow-hover);
    padding: 38px 38px 30px; position: relative; overflow: hidden;
}
.auth-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: var(--grad);
}
.auth-card h1 { font-size: 21px; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; font-size: 12.5px; color: var(--text-light); margin-bottom: 24px; }
.auth-links { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text-light); }

/* ============ 个人中心 ============ */
.profile-head {
    display: flex; gap: 22px; align-items: center;
    padding: 26px; color: #fff;
    background: linear-gradient(135deg, #31418a, #5a48a8 60%, #7c5cfc);
    border-radius: var(--radius); margin-top: 22px;
    box-shadow: 0 10px 30px rgba(43, 55, 110, .3);
    flex-wrap: wrap;
}
.profile-head .p-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-head .p-meta { font-size: 12.5px; color: rgba(255,255,255,.78); margin-top: 6px; }
.profile-tabs { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.profile-tabs a {
    padding: 7px 18px; border-radius: 999px; font-size: 13.5px;
    background: #fff; border: 1.5px solid var(--border); color: var(--text); font-weight: 500;
}
.profile-tabs a.active { background: var(--grad-btn); color: #fff; border-color: transparent; font-weight: 700; }

.avatar-up { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.bonus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bonus-item {
    text-align: center; padding: 14px 8px; border-radius: var(--radius-sm);
    border: 1.5px dashed var(--border); font-size: 12.5px;
}
.bonus-item.done { border: 1.5px solid rgba(47,185,134,.4); background: rgba(47,185,134,.06); }
.bonus-item .bi-icon { font-size: 22px; }
.bonus-item .bi-state { font-weight: 700; margin-top: 4px; }
.bonus-item .bi-state.got { color: var(--success); }
.bonus-item .bi-state.miss { color: var(--primary-deep); }

/* ============ 后台 ============ */
.admin-body { background: #f0f2f8; }
.admin-wrap {
    display: flex; min-height: calc(100vh - 60px);
    max-width: 1440px; margin: 0 auto;          /* PC 限宽 */
    width: 100%;
}
.admin-side {
    width: 220px; flex-shrink: 0; padding: 18px 14px;
    background: linear-gradient(180deg, #232a45 0%, #3a2f66 100%);
    position: sticky; top: 60px; align-self: flex-start;
    max-height: calc(100vh - 60px); overflow-y: auto;
}
.admin-side .as-title {
    color: rgba(255,255,255,.45); font-size: 11.5px; font-weight: 700;
    padding: 14px 12px 6px; letter-spacing: 2px;
}
.admin-side a {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 12px; margin: 2px 0; border-radius: var(--radius-sm);
    color: rgba(255,255,255,.75); font-size: 13.5px; transition: all .2s;
}
.admin-side a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-side a.active { background: var(--grad-btn); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(79,124,255,.4); }
.admin-side .as-badge {
    margin-left: auto; background: var(--danger); color: #fff;
    border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 17px; font-weight: 700;
}
.admin-main { flex: 1; padding: 24px 26px; min-width: 0; }

/* 后台顶栏/提示条与主内容区同宽（1440） */
.admin-body .container { width: min(1440px, 94%); }

/* ---- 后台区块间距统一：所有卡片 16px 间隔 ---- */
.admin-main .card { margin-top: 16px; }
.admin-main .admin-title + .admin-grid,
.admin-main .admin-title + .filter-bar,
.admin-main .admin-title + .admin-tabs,
.admin-main .admin-title + .card { margin-top: 16px; }

/* ---- 页面标题：带渐变竖条 + 底部分隔线 ---- */
.admin-title {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.admin-title h1 {
    font-size: 19px; font-weight: 800;
    display: flex; align-items: center; gap: 10px;
}
.admin-title h1::before {
    content: ""; width: 5px; height: 20px; border-radius: 4px; flex-shrink: 0;
    background: linear-gradient(180deg, #4f7cff, #7c5cfc);
}
.admin-title .sub { font-size: 12.5px; color: var(--text-light); font-weight: 400; }

/* ---- 后台页签（待处理/已处理等） ---- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tabs a {
    padding: 7px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
    background: #fff; border: 1.5px solid var(--border); color: var(--text);
    transition: all .2s;
}
.admin-tabs a:hover { border-color: var(--primary); color: var(--primary-deep); }
.admin-tabs a.active {
    background: var(--grad-btn); color: #fff; border-color: transparent;
    font-weight: 700; box-shadow: 0 4px 12px rgba(79,124,255,.3);
}

/* ---- 后台行内表单（表格内编辑/操作/筛选） ---- */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form .btn { flex-shrink: 0; }

/* ============ 表格（后台） ============ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th {
    font-size: 12px; color: var(--text-light); font-weight: 600;
    background: #f7f9fd; white-space: nowrap; letter-spacing: .5px;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8faff; }
.table .op { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.table .op form { display: inline-flex; }

/* ---- 后台输入控件统一风格（表格内 + 筛选栏 + 行内表单共用） ---- */
.table select, .table input[type="text"], .table input[type="number"],
.filter-bar input, .filter-bar select,
.inline-form input[type="text"], .inline-form input[type="number"], .inline-form select,
.card-b > .inline-form input, .card-b > form.inline-form input {
    padding: 7px 12px;
    border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13px; font-family: var(--font); color: var(--text);
    background: #fbfcfe; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.table select:hover, .table input[type="text"]:hover, .table input[type="number"]:hover,
.filter-bar input:hover, .filter-bar select:hover,
.inline-form input[type="text"]:hover, .inline-form input[type="number"]:hover, .inline-form select:hover { border-color: #c9d4ee; }
.table select:focus, .table input[type="text"]:focus, .table input[type="number"]:focus,
.filter-bar input:focus, .filter-bar select:focus,
.inline-form input[type="text"]:focus, .inline-form input[type="number"]:focus, .inline-form select:focus {
    border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(79,124,255,.12);
}

/* ---- 筛选栏：独立白色卡片条 ---- */
.filter-bar {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    padding: 12px 14px;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.filter-bar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
.filter-bar .btn { flex-shrink: 0; }

/* ---- 统计卡片 ---- */
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.admin-stat {
    background: #fff; border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.admin-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.admin-stat .as-num { font-size: 24px; font-weight: 800; margin-top: 4px; }
.admin-stat .as-lbl { font-size: 12.5px; color: var(--text-light); }
.admin-stat::after {
    content: ""; position: absolute; right: -18px; bottom: -18px;
    width: 70px; height: 70px; border-radius: 50%; opacity: .16;
}
.admin-stat.c1 .as-num { color: var(--primary-deep); } .admin-stat.c1::after { background: var(--primary); }
.admin-stat.c2 .as-num { color: var(--secondary); } .admin-stat.c2::after { background: var(--secondary); }
.admin-stat.c3 .as-num { color: var(--accent); } .admin-stat.c3::after { background: var(--accent); }
.admin-stat.c4 .as-num { color: var(--success); } .admin-stat.c4::after { background: var(--success); }

/* =====================================================
   帖子附件（图片网格 + 文件下载条）
   ===================================================== */
.attach-imgs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0 4px;
}
.attach-img-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--pink-bg);
    aspect-ratio: 4 / 3;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.attach-img-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(79,124,255,.18);
}
.attach-img-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.attach-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 4px;
}
.attach-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: #fbfcfe;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.attach-file-item:hover {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 5px 14px rgba(79,124,255,.12);
}
.attach-file-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}
.attach-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.attach-file-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.attach-file-item:hover .attach-file-name { color: var(--primary-deep); }
.attach-file-meta { font-size: 12px; color: var(--text-lighter); }
.attach-file-dl {
    flex-shrink: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
    padding: 4px 12px;
    border: 1.5px solid var(--primary);
    border-radius: 999px;
    background: rgba(79,124,255,.06);
    transition: background .2s, color .2s;
}
.attach-file-item:hover .attach-file-dl {
    background: var(--primary);
    color: #fff;
}

/* =====================================================
   BBCode 编辑器
   ===================================================== */
.bb-editor { display: flex; flex-direction: column; }
.bb-toolbar {
    display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
    padding: 7px 8px;
    border: 1.5px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(180deg, #f6f8ff, #eef2fd);
}
.bb-editor textarea {
    border-radius: 0 0 var(--radius) var(--radius);
    min-height: 140px;
}
.ed-btn {
    min-width: 28px; height: 28px;
    padding: 0 8px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 12.5px; font-family: var(--font); color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.ed-btn:hover { border-color: var(--primary); color: var(--primary-deep); box-shadow: 0 3px 8px rgba(79,124,255,.15); }
.ed-btn:active { transform: scale(.94); }
.ed-btn:disabled { opacity: .5; cursor: wait; }
.ed-sep {
    width: 1px; height: 18px;
    background: var(--border);
    margin: 0 3px;
    flex-shrink: 0;
}
.ed-size {
    height: 28px;
    width: 62px !important;
    min-width: 62px;
    padding: 0 4px !important;
    border: 1.5px solid var(--border) !important; border-radius: 8px !important;
    font-size: 12px; font-family: var(--font); color: var(--text);
    background: #fff !important; cursor: pointer;
    box-shadow: none !important;
    flex-shrink: 0;
    appearance: auto; -webkit-appearance: auto;
}
.ed-colors { display: inline-flex; gap: 4px; align-items: center; margin: 0 1px; flex-shrink: 0; }
.ed-dot {
    width: 16px; height: 16px;
    border: 2px solid #fff;
    outline: 1.5px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: transform .15s, outline-color .15s;
}
.ed-dot:hover { transform: scale(1.25); outline-color: var(--primary); }
.ed-emoji-panel {
    display: grid;
    grid-template-columns: repeat(9, 34px);
    gap: 4px;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    background: #fff;
    margin-top: -1px;
    max-height: 172px;
    overflow-y: auto;
    box-shadow: 0 10px 24px rgba(79,124,255,.14);
}
.ed-emoji-panel[hidden] { display: none; }
.ed-emoji-panel button {
    width: 34px; height: 34px;
    padding: 3px;
    border: none; background: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .1s;
}
.ed-emoji-panel button img { width: 28px; height: 28px; display: block; }
.ed-emoji-panel button:hover { background: var(--pink-bg); transform: scale(1.15); }
.ed-emoji-icon { width: 18px; height: 18px; display: block; }
.ed-hint {
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 6px;
}

/* ---------- 正文内 BBCode 渲染 ---------- */
.post-body .bb-img {
    max-width: min(560px, 100%);
    border-radius: 10px;
    border: 1.5px solid var(--border);
    margin: 8px 4px;
    display: inline-block;
    vertical-align: top;
    cursor: zoom-in;
    transition: box-shadow .2s;
}
.post-body .bb-img:hover { box-shadow: 0 6px 18px rgba(79,124,255,.2); }
.bb-code {
    background: #2b2d42;
    color: #e8ecff;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 14px 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 10px 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.bb-list {
    margin: 8px 0 8px 8px;
    padding-left: 22px;
    color: var(--text);
}
.bb-list li { margin: 4px 0; }
.bb-em {
    width: 28px; height: 28px;
    vertical-align: middle;
    margin: 0 2px;
    display: inline-block;
}

/* =====================================================
   响应式 - 平板（≤900px）
   ===================================================== */
@media (max-width: 900px) {
    .home-cols { flex-direction: column; }
    .home-side { width: 100%; }
    .stats-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); }
    .post-aside { width: 90px; }
    .nav-search { display: none; }
    .nav-points { display: none; }
    .hero { padding: 32px 26px; }
    .board-stats { display: none; }
    .bonus-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

    /* 后台侧栏转顶部横排 */
    .admin-wrap { flex-direction: column; }
    .admin-side {
        width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px;
        position: static; max-height: none;
    }
    .admin-side .as-title { display: none; }
    .admin-main { padding: 16px; }
    .admin-title { padding-bottom: 10px; }
}

/* =====================================================
   响应式 - 手机（≤640px）
   ===================================================== */
@media (max-width: 640px) {
    body { font-size: 14px; }

    /* 顶栏 */
    .topbar-inner { gap: 10px; height: 54px; padding: 0 2px; }
    .logo { font-size: 17px; }
    .logo-mark { width: 28px; height: 28px; border-radius: 9px; font-size: 13px; }
    .nav-links a { padding: 6px 11px; font-size: 13px; }
    .nav-user { gap: 8px; font-size: 13px; }
    .nav-user .btn-sm { padding: 4px 12px; font-size: 12px; }

    /* 英雄区 */
    .hero { padding: 24px 20px; border-radius: 16px; margin-top: 14px; }
    .hero h1 { font-size: 21px; letter-spacing: 1px; }
    .hero p { font-size: 12.5px; }
    .hero-cta { width: 100%; }
    .hero-cta .btn { flex: 1; }

    /* 卡片与内边距收紧 */
    .container, .container-narrow { width: 100%; padding: 0 10px; }
    .card { border-radius: 12px; margin-top: 14px; box-shadow: 0 3px 14px rgba(80,100,200,.08); }
    .card-h { padding: 12px 14px; }
    .card-b { padding: 14px; }
    .flash { margin-top: 10px; }
    .flash-msg { padding: 9px 13px; font-size: 12.5px; border-radius: 8px; }
    .section-title { margin: 20px 0 -4px; font-size: 14px; }

    /* 版块列表 */
    .board-item { padding: 13px 14px; gap: 12px; }
    .board-icon { width: 44px; height: 44px; font-size: 21px; border-radius: 12px; }
    .board-main .b-name { font-size: 14.5px; }
    .board-main .b-desc { font-size: 12px; }

    /* 主题列表 */
    .thread-item { padding: 12px 14px; gap: 10px; }
    .thread-item .avatar-md { width: 36px; height: 36px; }
    .thread-item .t-title { font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .thread-item .t-right { font-size: 11px; }
    .thread-item .t-right .cnt b { font-size: 12.5px; }

    /* 帖子：改为上下结构，作者信息横排 */
    .post { flex-direction: column; gap: 10px; padding: 16px 14px; }
    .post-aside {
        width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
        padding: 8px 12px;
    }
    .post-aside .avatar { width: 40px; height: 40px; border-width: 2px; }
    .post-aside .uname { margin-top: 0; }
    .post-aside .u-title { margin-top: 0; }
    .post-aside .u-stats { margin-top: 0; }
    .post-aside .aside-col { min-width: 0; }
    .aside-col { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
    .post-head { margin-bottom: 8px; padding-bottom: 6px; }
    .post-body { font-size: 14px; }
    .post-foot { gap: 6px; margin-top: 12px; }
    .post-foot .btn-sm { padding: 4px 11px; font-size: 12px; }
    .post-foot form { display: inline-flex; }
    .thread-title-bar { padding: 14px; }
    .thread-title-bar h1 { font-size: 16.5px; }

    /* 认证页 */
    .auth-wrap { padding: 20px 12px; }
    .auth-card { padding: 26px 20px 22px; border-radius: 16px; }
    .auth-card h1 { font-size: 19px; }
    .captcha-row input { font-size: 16px; } /* 避免 iOS 聚焦缩放 */
    .form-group input, .form-group select { font-size: 16px; } /* 避免 iOS 聚焦缩放 */
    .form-group textarea { font-size: 15px; }

    /* 个人中心 */
    .profile-head { padding: 18px 16px; gap: 14px; border-radius: 12px; }
    .profile-head .avatar-lg { width: 64px; height: 64px; }
    .profile-head .p-name { font-size: 17px; }
    .profile-head .p-meta { font-size: 11.5px; }
    .profile-tabs { margin-top: 12px; gap: 5px; }
    .profile-tabs a { padding: 6px 13px; font-size: 12.5px; }
    .bonus-grid { grid-template-columns: 1fr; gap: 8px; }
    .bonus-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; }
    .bonus-item .bi-icon { font-size: 19px; }

    /* 表格 */
    .table { font-size: 12.5px; }
    .table th, .table td { padding: 9px 10px; }
    .table .op { gap: 5px; }

    /* 后台 */
    .admin-title h1 { font-size: 17px; }
    .admin-title h1::before { height: 17px; }
    .filter-bar { padding: 10px 12px; gap: 8px; }
    .filter-bar input, .filter-bar select { font-size: 16px; } /* 避免 iOS 聚焦缩放 */
    .inline-form input, .inline-form select { font-size: 16px; } /* 避免 iOS 聚焦缩放 */
    .filter-bar form { width: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
    .admin-tabs { gap: 6px; }
    .admin-tabs a { padding: 6px 14px; font-size: 12.5px; }
    .inline-form { gap: 6px; }
    .admin-stat { padding: 14px 16px; }

    /* 附件 */
    .attach-imgs { grid-template-columns: repeat(2, 1fr); }
    .admin-stat .as-num { font-size: 20px; }

    /* 分页 */
    .pagination { gap: 5px; padding: 16px 8px 4px; }
    .pagination a, .pagination .pg-cur { padding: 6px 13px; font-size: 13px; }

    /* 空状态/页脚 */
    .empty { padding: 32px 14px; }
    .empty .deco { font-size: 28px; }
    .footer { margin: 28px 0 18px; font-size: 11.5px; line-height: 1.9; }

    /* 按钮触控优化 */
    .btn { min-height: 40px; }
    .btn-sm { min-height: 30px; }
}
