* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #243241;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
}

body.theme-dark {
    background: #10161d;
    color: #d7e0ea;
}

body.theme-dark .site-header,
body.theme-dark .card,
body.theme-dark .footer,
body.theme-dark .friend-links,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #151f29;
    color: #d7e0ea;
    border-color: #273646;
}

body.theme-dark .brand,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark .section-title {
    color: #f3f7fb;
}

body.theme-dark a,
body.theme-dark .btn-light {
    color: #7bc4ff;
}

body.theme-dark .btn {
    background: #2e8fd0;
}

body.theme-cool-ocean .btn,
body.theme-cool-ocean .image-badge { background: #146c94; }
body.theme-cool-ocean a,
body.theme-cool-ocean .brand { color: #0f5f82; }
body.theme-cool-ocean { background: #f4fbfd; }

body.theme-cool-mint .btn,
body.theme-cool-mint .image-badge { background: #16876d; }
body.theme-cool-mint a,
body.theme-cool-mint .brand { color: #136f5b; }
body.theme-cool-mint { background: #f5fcf9; }

body.theme-cool-slate .btn,
body.theme-cool-slate .image-badge { background: #4b6478; }
body.theme-cool-slate a,
body.theme-cool-slate .brand { color: #40586c; }
body.theme-cool-slate { background: #f6f8fa; }

body.theme-warm-sand .btn,
body.theme-warm-sand .image-badge { background: #b7793b; }
body.theme-warm-sand a,
body.theme-warm-sand .brand { color: #9a642e; }
body.theme-warm-sand { background: #fffaf3; }

body.theme-warm-rose .btn,
body.theme-warm-rose .image-badge { background: #b45d72; }
body.theme-warm-rose a,
body.theme-warm-rose .brand { color: #9c4d62; }
body.theme-warm-rose { background: #fff7f8; }

body.theme-warm-amber .btn,
body.theme-warm-amber .image-badge { background: #c18417; }
body.theme-warm-amber a,
body.theme-warm-amber .brand { color: #95630e; }
body.theme-warm-amber { background: #fff9ed; }

a {
    color: #2274a5;
    text-decoration: none;
}

a:hover {
    color: #155c85;
}

.wrap {
    width: 1120px;
    max-width: 94%;
    margin: 0 auto;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #edf1f5;
}

.nav {
    min-height: 62px;
    overflow: hidden;
    padding: 14px 0;
}

.brand {
    float: left;
    font-size: 26px;
    line-height: 34px;
    font-weight: 800;
    color: #12344d;
}

.nav nav {
    float: right;
    line-height: 34px;
}

.nav nav a {
    margin-left: 18px;
    color: #435466;
}

.signin-form {
    display: inline-block;
    margin: 0 0 0 14px;
}

.signin-form button,
.signin-done {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #cfe0eb;
    border-radius: 999px;
    color: #2274a5;
    background: #f3f9fd;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
}

.signin-done {
    color: #7a8793;
    background: #f5f7f9;
    cursor: default;
}

.signin-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(18, 52, 77, .22);
}

.signin-modal-box {
    width: 520px;
    max-width: 94vw;
    max-height: 82vh;
    overflow: auto;
    padding: 20px;
    border: 1px solid #d8e3ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(18, 52, 77, .2);
}

.signin-modal-box h2 {
    margin: 0 0 8px;
    color: #12344d;
}

.signin-rank-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
}

.signin-rank-mini h3 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #12344d;
}

.signin-rank-mini ol {
    margin: 0;
    padding-left: 18px;
    color: #6f7f8f;
    font-size: 13px;
    line-height: 1.8;
}

.user-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notification-bell-link {
    font-size: 19px;
    line-height: 1;
}

.bell-icon {
    display: inline-block;
    transform-origin: 50% 0;
    animation: qfBellShake .85s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(229, 57, 53, .25));
}

@keyframes qfBellShake {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(16deg); }
    30% { transform: rotate(-14deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d8e3ec;
    vertical-align: middle;
}

.card {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid #e5edf3;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(42, 80, 110, .06);
    padding: 20px;
    margin-top: 16px;
}

.hero,
.page-head {
    overflow: hidden;
}

.hero h1,
.page-head h1,
.post-title-card h1 {
    margin: 0 0 8px;
    color: #12344d;
}

/* 帖子页：标题、正文、回复使用三个同级独立框 */
.post-title-card .post-meta {
    margin-bottom: 10px;
}

.post-title-card h1 {
    margin: 0;
    line-height: 1.5;
    font-size: 22px;
}

.post-content-card {
    min-height: 260px;
}

.post-content-box {
    padding: 0;
}

.content-page-nav {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}

.content-page-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    margin-right: 6px;
    border: 1px solid #d8e6ef;
    border-radius: 8px;
    background: #fff;
    color: #435466;
}

.content-page-nav a.active {
    color: #fff;
    border-color: #2274a5;
    background: #2274a5;
}

/* 板块页“返回首页”小字链接 */
.page-head h1 .back-home {
    margin-left: 10px;
    font-size: 13px;
    font-weight: normal;
    color: #2274a5;
    vertical-align: middle;
}

.page-head h1 .back-home:hover {
    color: #155c85;
    text-decoration: underline;
}

/* 首页“最新帖子”行内手机端发帖按钮：桌面端隐藏 */
.mobile-post-btn {
    display: none !important;
}

/* 首页列表作者信息行里的手机版浏览/回复统计：桌面端隐藏 */
.meta-metrics {
    display: none;
}

.hero p,
.page-head p,
.muted {
    color: #6f7f8f;
}

.hero .btn,
.page-head .btn {
    float: right;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background: #2274a5;
    color: #fff !important;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: bold;
}

.btn:hover {
    background: #155c85;
}

.btn-light {
    background: #eef5fb;
    color: #2274a5 !important;
    margin-left: 8px;
}

.btn-light:hover {
    background: #dfeef8;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
}

.grid {
    overflow: hidden;
}

.grid > section {
    float: left;
    width: 760px;
    max-width: 100%;
}

.grid > aside {
    float: right;
    width: 330px;
}

.section-title {
    font-size: 18px;
    margin: 22px 0 10px;
    color: #12344d;
}

.latest-title-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.latest-title-filter {
    position: relative;
    display: inline-block;
}

.latest-title-filter .section-title {
    margin-right: auto;
}

.latest-title-trigger {
    cursor: pointer;
}

.latest-title-dropdown {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 30;
    min-width: 128px;
    padding: 8px;
    border: 1px solid #e5edf3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(18, 52, 77, .14);
    transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.latest-title-dropdown a {
    display: block;
    padding: 9px 10px;
    border-radius: 7px;
    color: #435466;
    font-size: 14px;
}

.latest-title-dropdown a:hover {
    color: #2274a5;
    background: #f1f7fb;
}

.latest-title-filter:hover .latest-title-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.image-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    color: #fff;
    background: #2f8ec4;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.forum-card {
    display: block;
    overflow: hidden;
    color: inherit;
    min-height: 86px;
}

.forum-card > div:first-child {
    float: left;
    width: 70%;
}

.forum-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.forum-card p {
    margin: 0;
    color: #6f7f8f;
}

.stats {
    float: right;
    width: 25%;
    text-align: right;
    color: #6f7f8f;
}

.stats strong {
    display: block;
    margin-left: 0;
    color: #12344d;
    font-size: 18px;
}

.side-forum-card {
    min-height: 0;
    padding: 16px;
}

.side-forum-card > div:first-child,
.side-forum-card .stats {
    float: none;
    width: 100%;
    text-align: left;
}

.side-forum-card .stats {
    margin-top: 10px;
}

.side-forum-card .stats strong {
    display: inline-block;
    margin-right: 4px;
}

.ad-box {
    margin: 14px 0;
    text-align: center;
    overflow: hidden;
}

.ad-box img {
    max-width: 100%;
    height: auto;
    vertical-align: top;
}

.ad-top {
    margin-top: 16px;
}

.ad-sidebar {
    margin: 0 0 12px;
}

.ad-footer {
    margin: 24px 0 0;
}

.ad-preview {
    margin: 10px 0 16px;
    padding: 10px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #fafcff;
}

.ad-preview img {
    max-width: 100%;
    height: auto;
}

.inline-check {
    width: auto;
    margin-right: 6px;
}

.latest-list .list-row a {
    font-size: 16px;
}

.list-row {
    position: relative;
    overflow: hidden;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.list-row:last-child {
    border-bottom: 0;
}

.list-row a {
    font-weight: bold;
    color: #243241;
}

.list-row p {
    margin: 5px 0 0;
    color: #7a8793;
    font-size: 12px;
}

.list-main {
    float: left;
    width: 78%;
}

.list-metrics {
    float: right;
    width: 20%;
    text-align: right;
    color: #b8c0c8;
    font-size: 13px;
    padding-top: 9px;
    white-space: nowrap;
}

.list-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 14px;
    line-height: 1;
}

.metric svg {
    width: 16px;
    height: 16px;
    stroke: #c3cad1;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-view svg circle {
    fill: none;
}

.thread-list {
    padding: 0;
}

.filter-tabs {
    margin-top: 14px;
    border-bottom: 1px solid #edf2f7;
}

.filter-tabs a {
    display: inline-block;
    padding: 10px 16px;
    margin-right: 4px;
    color: #6f7f8f;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.filter-tabs a.active {
    color: #2274a5;
    background: #fff;
    border-color: #edf2f7;
    font-weight: 700;
}

.category-tabs {
    margin-top: 8px;
}

.thread-row {
    overflow: hidden;
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
}

.thread-row:last-child {
    border-bottom: 0;
}

.thread-main {
    float: left;
    width: 75%;
}

.thread-title {
    font-size: 16px;
    font-weight: 700;
    color: #243241;
}

.thread-main p {
    margin: 6px 0 0;
    color: #7a8793;
}

.thread-count {
    float: right;
    width: 20%;
    text-align: right;
    color: #7a8793;
    line-height: 1.7;
}

.tag {
    display: inline-block;
    margin-right: 5px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
}

.tag.red {
    background: #fff1f0;
    color: #c0392b;
}

.tag.blue {
    background: #e8f3ff;
    color: #1f6fa8;
}

.category-tag {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    color: #6b4b00;
    background: #fff4d6;
    font-size: 12px;
    font-weight: 700;
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

.forum-table th,
.forum-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
    word-break: break-all;
}

.forum-table th {
    color: #6f7f8f;
    font-size: 12px;
    font-weight: 700;
}

.forum-table input[type="text"],
.forum-table input[type="number"] {
    margin: 0;
    padding: 7px 8px;
    font-size: 13px;
}

.forum-name-col {
    width: 118px;
}

.forum-desc-col {
    width: 155px;
}

.forum-category-col {
    width: 255px;
}

.forum-limit-col {
    width: 250px;
}

.forum-order-col {
    width: 60px;
}

.forum-del-col {
    width: 64px;
    text-align: center;
}

.forum-table .forum-order-input {
    width: 48px;
    max-width: 48px;
    padding-left: 6px;
    padding-right: 4px;
    text-align: center;
}

.forum-table .category-cell,
.forum-table .limit-cell {
    width: auto;
}

.forum-admin-table .forum-category-cell input[type="text"] {
    width: 145px;
    min-width: 0;
}

.forum-admin-table .forum-limit-cell input[type="text"] {
    width: 140px;
    min-width: 0;
}

.forum-admin-table .category-inline {
    margin-right: 6px;
    font-size: 12px;
}

.forum-admin-table td:last-child label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    white-space: nowrap;
    font-size: 12px;
}

.add-forum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 80px;
    gap: 14px;
    align-items: end;
}

.category-cell {
    white-space: nowrap;
}

.limit-cell {
    white-space: nowrap;
}

.category-inline {
    display: inline-block;
    margin-right: 8px;
    white-space: nowrap;
}

.category-cell input[type="text"] {
    display: inline-block;
    width: calc(100% - 72px);
    min-width: 150px;
}

.limit-cell input[type="text"] {
    display: inline-block;
    width: calc(100% - 72px);
    min-width: 120px;
}

.ban-form {
    margin-bottom: 18px;
}

.admin-page-title {
    margin-bottom: 6px;
}

.admin-page-title h1 {
    margin: 0;
}

.admin-back-row {
    margin: 4px 0 14px;
}

.user-search {
    margin: 12px 0;
}

.user-table {
    table-layout: fixed;
}

.user-table th:nth-child(1),
.user-table td:nth-child(1) {
    width: 54px;
}

.user-table th:nth-child(2),
.user-table td:nth-child(2) {
    width: 110px;
}

.user-table th:nth-child(3),
.user-table td:nth-child(3) {
    width: 120px;
}

.user-table th:nth-child(4),
.user-table td:nth-child(4) {
    width: 120px;
}

.user-table th:nth-child(5),
.user-table td:nth-child(5) {
    width: 78px;
}

.user-table th:nth-child(6),
.user-table td:nth-child(6) {
    width: 150px;
}

.user-table th:last-child,
.user-table td:last-child {
    width: 330px;
}

.user-actions form {
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px;
    align-items: center;
    margin: 3px 0;
}

.user-actions .user-action-clear {
    display: block;
}

.user-actions .user-action-clear .btn {
    width: 100%;
}

.user-actions input[type="number"] {
    width: 64px;
    margin: 0;
    padding: 7px 8px;
}

.user-actions input[type="password"] {
    width: 108px;
    margin: 0;
    padding: 7px 8px;
}

.user-actions .btn-small {
    padding: 7px 9px;
    white-space: nowrap;
}

.user-actions .user-action-moderator {
    display: block;
}

.user-actions .user-action-moderator .btn {
    width: 100%;
}

.moderator-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 999px;
    color: #7a4b00;
    background: #fff0c2;
    border: 1px solid #f2d27a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.btn-danger {
    background: #d93025;
}

.btn-danger:hover {
    background: #b42318;
}

.danger-link {
    color: #d93025;
    font-weight: 700;
}

.post-meta {
    color: #7a8793;
    font-size: 13px;
    margin-bottom: 10px;
}

.admin-tools {
    float: right;
}

.admin-tools a {
    margin-left: 8px;
}

.move-thread-form {
    display: inline-block;
    margin-left: 8px;
}

.move-thread-form select {
    width: 96px;
    padding: 2px 4px;
    margin: 0 3px 0 0;
    font-size: 12px;
}

.move-thread-form button {
    padding: 0;
    border: 0;
    background: none;
    color: #2274a5;
    cursor: pointer;
    font-size: 12px;
}

.content {
    line-height: 1.9;
    font-size: 15px;
    word-break: break-word;
}

.content-link {
    color: #1f78b4;
    border-bottom: 1px dashed rgba(31, 120, 180, .45);
    font-weight: 600;
}

.content-link:hover {
    color: #155c85;
    border-bottom-style: solid;
}

.remote-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border-radius: 8px;
}

.content img,
.attachment-img,
.remote-img {
    transition: max-width .18s ease, transform .18s ease, box-shadow .18s ease;
}

.content img:hover,
.attachment-img:hover,
.remote-img:hover {
    position: relative;
    z-index: 20;
    max-width: 900px;
    height: auto;
    transform: scale(1.02);
    box-shadow: 0 12px 36px rgba(18, 52, 77, .22);
}

.footer-friend-links {
    color: #7a8793;
}

.footer-friend-links a {
    margin-left: 8px;
    color: #7a8793;
}

.attachment-list {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
    overflow: hidden;
}

.reply-attachments {
    margin-top: 10px;
    padding-top: 10px;
}

.attachment-list h3 {
    margin: 0 0 12px;
    color: #12344d;
}

.attachment-img {
    display: inline-block;
    width: 480px;
    max-width: 100%;
    height: auto;
    margin: 0 12px 12px 0;
    border-radius: 8px;
    border: 1px solid #e5edf3;
    vertical-align: top;
}

.reply-attachments .attachment-img {
    display: inline-block;
    width: 220px;
    max-width: 100%;
}

.attachment-file {
    display: block;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #e5edf3;
    border-radius: 8px;
    background: #fafcff;
}

.attachment-inline-card {
    display: block;
    max-width: 560px;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #d7e7f2;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fcff, #f1f8fd);
    color: #34566f;
}

.attachment-inline-link {
    display: block;
    color: inherit;
}

.attachment-inline-card strong,
.attachment-inline-card span {
    display: block;
}

.attachment-inline-card strong {
    color: #12344d;
    font-size: 15px;
}

.attachment-inline-card span {
    margin-top: 4px;
    color: #6f7f8f;
    font-size: 12px;
}

.attachment-delete-form {
    display: inline-block;
    margin: 6px 0 10px;
}

.attachment-inline-card .attachment-delete-form {
    display: block;
    margin: 8px 0 0;
}

.attachment-delete-btn {
    border: 0;
    border-radius: 999px;
    background: #d64b4b;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
}

.attachment-delete-btn:hover {
    background: #b93636;
}

.reply {
    padding: 14px 0;
    border-bottom: 1px solid #edf2f7;
}

.floor-replies {
    margin: 6px 0 0;
    padding: 0;
    border-left: 0;
    background: transparent;
    border-radius: 0;
}

.floor-reply {
    padding: 4px 0 4px 18px;
    color: #435466;
    font-size: 13px;
}

.floor-reply span {
    color: #9aa8b5;
    font-size: 12px;
}

.floor-reply-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-left: 18px;
}

.floor-label {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef6fb;
    color: #2274a5;
    font-size: 12px;
}

.floor-icon {
    margin-left: 3px;
    font-size: 13px;
}

.floor-reply-actions {
    float: right;
}

.floor-reply-toggle.btn {
    padding: 5px 12px;
    font-size: 12px;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 16px;
}

.notification-actions form {
    margin: 0;
}

.floor-reply-form input {
    flex: 1;
    margin: 0;
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-item {
    display: block;
    padding: 12px 14px;
    border: 1px solid #e5edf3;
    border-radius: 10px;
    background: #fafcff;
}

.notification-item span {
    display: block;
    margin-top: 4px;
    color: #9aa8b5;
    font-size: 12px;
}

.reply:last-child {
    border-bottom: 0;
}

.narrow,
.narrow-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

label {
    display: block;
    margin: 12px 0 6px;
    color: #435466;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    padding: 11px 12px;
    outline: none;
    font-size: 14px;
    background: #fff;
}

textarea {
    resize: vertical;
}

.post-form-card {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.post-content-textarea {
    min-height: 320px;
    line-height: 1.8;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid #d8e3ec;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f7fbff;
}

.editor-toolbar button {
    width: auto;
    padding: 6px 10px;
    border: 1px solid #cfe0eb;
    border-radius: 6px;
    color: #34566f;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}

.editor-toolbar + textarea {
    border-radius: 0 0 8px 8px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #6aa6d6;
    box-shadow: 0 0 0 3px rgba(34, 116, 165, .12);
}

.captcha-box {
    margin: 12px 0;
}

.captcha-row {
    overflow: hidden;
}

.captcha-row input {
    float: left;
    width: 220px;
    max-width: calc(100% - 176px);
}

.captcha-row img {
    float: left;
    width: 160px;
    height: 52px;
    margin-left: 12px;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    cursor: pointer;
    background: #f5f9fc;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.upload-captcha-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 12px 0 18px;
}

.captcha-col {
    flex: 1;
}

.upload-col {
    width: 150px;
    text-align: center;
    position: relative;
    padding-top: 12px;
}

.upload-icon-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 92px;
    height: auto;
    margin: 0;
    color: #2274a5;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.upload-icon-box input {
    display: none;
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 52px;
    border: 1px dashed #9fc3dc;
    border-radius: 10px;
    background: #f5fbff;
}

.upload-icon svg {
    fill: none;
    stroke: #34566f;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-text {
    display: block;
    margin-top: 5px;
    color: #34566f;
    font-size: 13px;
    line-height: 1.2;
}

.upload-help {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-left: 4px;
    vertical-align: top;
    padding: 0;
    border: 1px solid #cfe0eb;
    border-radius: 50%;
    color: #6f7f8f;
    background: #fff;
    cursor: pointer;
}

.upload-tip {
    display: none;
    position: absolute;
    right: 0;
    top: 92px;
    z-index: 5;
    width: 260px;
    padding: 10px 12px;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 52, 77, .12);
    text-align: left;
}

.upload-status {
    margin: 8px 0 0;
    font-size: 12px;
}

.rank-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.profile-avatar-preview {
    margin: 12px 0;
}

.profile-avatar-preview img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #d8e3ec;
    background: #f5f9fc;
}

form .btn {
    margin-top: 14px;
}

.forum-edit-form {
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.forum-edit-form:last-child {
    border-bottom: 0;
}

.forum-edit-form input {
    margin-bottom: 8px;
}

.alert {
    background: #fff5e6;
    color: #9a5a00;
    border: 1px solid #ffdfaa;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 12px 0;
}

.success {
    color: #187447;
}

.danger {
    color: #b42318;
}

.search {
    overflow: hidden;
}

.search input {
    float: left;
    width: 80%;
}

.search .btn {
    float: right;
    width: 18%;
    margin-top: 0;
}

.footer {
    margin-top: 30px;
    padding: 22px 0;
    color: #7a8793;
    border-top: 1px solid #edf1f5;
}

.copyright {
    text-align: left;
}

.powered-text {
    font-size: 11px;
    color: #b6c0ca;
}

.powered-by {
    color: #9aa8b5;
    font-weight: 400;
}

@media (max-width: 860px) {
    .wrap {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .site-header .wrap.nav {
        padding-left: 24px;
        padding-right: 24px;
    }

    .nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        min-height: 0;
        overflow: visible;
        padding: 18px 0 14px;
    }

    .brand,
    .nav nav,
    .grid > section,
    .grid > aside,
    .forum-card > div:first-child,
    .stats,
    .thread-main,
    .list-main,
    .search input,
    .search .btn {
        float: none;
        width: 100%;
    }

    .brand {
        line-height: 1.2;
    }

    .nav nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
        line-height: 1.4;
    }

    .nav nav a {
        display: inline-flex;
        align-items: center;
        margin: 0;
    }

    .signin-form {
        margin: 0;
    }

    .user-mini {
        max-width: 120px;
    }

    .user-mini span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stats {
        text-align: left;
        margin-top: 10px;
    }

    .thread-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .thread-main {
        flex: 1;
        min-width: 0;
    }

    .thread-count {
        flex: 0 0 auto;
        float: none;
        width: auto;
        text-align: right;
        margin-top: 0;
        padding-top: 0;
        white-space: nowrap;
    }

    /* 手机端：首页帖子统计放到作者信息浅色文字这一行，避免挡住标题 */
    .list-row {
        display: block;
    }

    .list-main {
        width: 100%;
    }

    .latest-list .list-row a {
        display: block;
        padding-right: 0;
    }

    .list-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .meta-text {
        flex: 1;
        min-width: 0;
    }

    .list-metrics {
        display: none;
    }

    .meta-metrics {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
        margin-left: auto;
        color: #b8c0c8;
        white-space: nowrap;
        vertical-align: middle;
    }

    .meta-metrics .metric {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        line-height: 1;
    }

    .meta-metrics svg {
        width: 14px;
        height: 14px;
    }

    /* 手机端：隐藏 hero 区的“发布新帖”按钮，改用最新帖子行内按钮 */
    .hero .btn,
    .page-head .btn {
        display: none;
    }

    .hero,
    .page-head {
        text-align: left;
    }

    .mobile-post-btn {
        display: inline-block !important;
        margin-left: auto;
        padding: 6px 12px;
        font-size: 12px;
    }

    .latest-title-menu {
        flex-wrap: nowrap;
    }

    .admin-tools {
        float: none;
        display: block;
        margin-top: 6px;
    }

    .search .btn {
        margin-top: 10px;
    }

    .attachment-list {
        overflow: hidden;
    }

    .attachment-list a {
        display: block;
        max-width: 100%;
    }

    .attachment-img,
    .reply-attachments .attachment-img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        margin-right: 0;
    }

    .rank-grid {
        display: block;
    }

    .admin-stack {
        display: block;
    }

    .admin-stack .card {
        padding: 18px 14px;
        overflow: hidden;
    }

    .admin-stack .btn,
    .card > p .btn {
        display: block;
        width: 100%;
        margin: 8px 0;
        text-align: center;
    }

    .add-forum-grid {
        display: block;
    }

    .category-cell,
    .limit-cell {
        display: block;
    }

    .category-inline {
        display: inline-flex;
        align-items: center;
        width: auto;
    }

    .mobile-admin-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 手机端后台版块表格：卡片化显示，电脑版保持原表格 */
    .admin-stack .forum-table {
        display: block;
        overflow-x: visible;
        white-space: normal;
        border-collapse: separate;
    }

    .forum-admin-table tr:first-child {
        display: none;
    }

    .forum-admin-table tr {
        display: block;
        margin: 12px 0;
        padding: 12px;
        border: 1px solid #edf2f7;
        border-radius: 12px;
        background: #fafcff;
    }

    .forum-admin-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border-bottom: 0;
    }

    .forum-admin-table td::before {
        display: block;
        margin-bottom: 5px;
        color: #6f7f8f;
        font-size: 12px;
        font-weight: 700;
    }

    .forum-admin-table td:nth-child(1)::before { content: "名称"; }
    .forum-admin-table td:nth-child(2)::before { content: "简介"; }
    .forum-admin-table td:nth-child(3)::before { content: "主题分类"; }
    .forum-admin-table td:nth-child(4)::before { content: "指定用户ID发帖"; }
    .forum-admin-table td:nth-child(5)::before { content: "排序"; }
    .forum-admin-table td:nth-child(6)::before { content: "删除"; }

    .admin-stack .forum-table input[type="text"],
    .admin-stack .forum-table input[type="number"],
    .forum-admin-table .forum-category-cell input[type="text"],
    .forum-admin-table .forum-limit-cell input[type="text"] {
        width: 100%;
        min-width: 0;
    }

    .forum-table .forum-order-input {
        max-width: 100%;
    }

    .forum-table:not(.forum-admin-table) {
        overflow-x: auto;
        white-space: nowrap;
    }

    .floor-reply-form {
        display: block;
    }

    .floor-reply-form .btn {
        width: 100%;
        margin-top: 8px;
    }

    .user-table tr:first-child {
        display: none;
    }

    .user-table tr {
        display: block;
        margin: 12px 0;
        padding: 12px;
        border: 1px solid #edf2f7;
        border-radius: 12px;
        background: #fafcff;
    }

    .user-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
        border-bottom: 0;
        white-space: normal;
    }

    .user-table td:nth-child(1)::before { content: "ID"; }
    .user-table td:nth-child(2)::before { content: "用户名"; }
    .user-table td:nth-child(3)::before { content: "昵称"; }
    .user-table td:nth-child(4)::before { content: "状态"; }
    .user-table td:nth-child(5)::before { content: "权限"; }
    .user-table td:nth-child(6)::before { content: "注册时间"; }
    .user-table td:nth-child(7)::before { content: "操作"; }

    .user-table td::before {
        display: block;
        margin-bottom: 5px;
        color: #6f7f8f;
        font-size: 12px;
        font-weight: 700;
    }

    .user-actions form,
    .user-actions input,
    .user-actions button {
        display: block;
        width: 100%;
        margin: 6px 0;
    }
}
