/* ==========================================================================
   TalkBoard 轻语论坛 - emlog 模板样式
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
    --tb-primary: #2563eb;
    --tb-bg: #f5f7fa;
    --tb-card: #ffffff;
    --tb-text: #1f2937;
    --tb-text-light: #6b7280;
    --tb-border: #e5e7eb;
    --tb-radius: 10px;
    --tb-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    --tb-shadow-hover: 0 6px 18px rgba(15, 23, 42, .08);
    --tb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

[data-theme="dark"] {
    --tb-bg: #0f172a;
    --tb-card: #1e293b;
    --tb-text: #e2e8f0;
    --tb-text-light: #94a3b8;
    --tb-border: #334155;
    --tb-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --tb-shadow-hover: 0 6px 18px rgba(0, 0, 0, .5);
}

/* ---------- 基础 ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--tb-font);
    font-size: 15px;
    line-height: 1.7;
    color: var(--tb-text);
    background: var(--tb-bg);
    transition: background-color .3s, color .3s;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--tb-primary);
}

img {
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.column-big {
    flex: 1;
    min-width: 0;
}

.column-small {
    width: 320px;
    flex-shrink: 0;
}

.shadow-theme {
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow);
}

.tb-dot {
    color: var(--tb-text-light);
    margin: 0 2px;
}

/* ---------- 顶部导航 ---------- */
.tb-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--tb-card);
    border-bottom: 1px solid var(--tb-border);
    transition: background-color .3s, border-color .3s;
}

.tb-header-inner {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 24px;
}

.tb-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .5px;
    white-space: nowrap;
}

.tb-logo:hover {
    color: var(--tb-text);
}

.tb-logo-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: var(--tb-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tb-primary) 18%, transparent);
}

.tb-logo-img img {
    height: 36px;
    display: block;
}

.blog-header-toggle {
    display: none;
    cursor: pointer;
    margin-left: auto;
}

.blogtoggle-icon {
    width: 28px;
    height: 20px;
    display: block;
}

/* 导航菜单 */
.blog-header-nav {
    margin-left: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-menu {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14.5px;
    color: var(--tb-text-light);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--tb-primary);
    background: color-mix(in srgb, var(--tb-primary) 8%, transparent);
}

.header-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-menus {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 140px;
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    border-radius: 10px;
    box-shadow: var(--tb-shadow-hover);
    list-style: none;
    margin: 6px 0 0;
    padding: 6px;
    display: none;
    z-index: 110;
}

.list-menu:hover .dropdown-menus,
.dropdown-menus:hover {
    display: block;
}

.dropdown-menus .nav-link {
    display: block;
    padding: 8px 12px;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 板块导航条 */
.tb-boards {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tb-boards::-webkit-scrollbar {
    display: none;
}

.tb-board {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--tb-text-light);
    border: 1px solid transparent;
    white-space: nowrap;
}

.tb-board:hover {
    color: var(--tb-primary);
    background: color-mix(in srgb, var(--tb-primary) 8%, transparent);
}

.tb-board.is-active {
    color: #fff;
    background: var(--tb-primary);
}

.tb-board i {
    font-style: normal;
    font-size: 12px;
    opacity: .75;
}

.tb-board.is-active:hover {
    color: #fff;
}

/* ---------- 论坛数据统计条 ---------- */
.tb-stats {
    display: flex;
    margin-bottom: 16px;
    overflow: hidden;
}

.tb-stats-item {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
    position: relative;
}

.tb-stats-item + .tb-stats-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--tb-border);
}

.tb-stats-item b {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--tb-primary);
}

.tb-stats-item span {
    font-size: 12.5px;
    color: var(--tb-text-light);
}

/* ---------- 帖子列表 ---------- */
.tb-thread-list {
    margin-bottom: 16px;
}

.tb-thread {
    display: flex;
    gap: 14px;
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.tb-thread:hover {
    box-shadow: var(--tb-shadow-hover);
    border-color: color-mix(in srgb, var(--tb-primary) 35%, var(--tb-border));
}

.tb-thread-avatar {
    flex-shrink: 0;
}

.tb-thread-avatar img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--tb-bg);
}

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

.tb-thread-title {
    margin: 0 0 4px;
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.5;
}

.tb-thread-title a {
    color: var(--tb-text);
}

.tb-thread-title a:hover {
    color: var(--tb-primary);
}

.tb-flag {
    display: inline-block;
    vertical-align: 2px;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #f59e0b;
}

.tb-flag-sort {
    background: var(--tb-primary);
}

.tb-list-sort a {
    display: inline-block;
    vertical-align: 2px;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--tb-primary);
    background: color-mix(in srgb, var(--tb-primary) 10%, transparent);
}

.tb-thread-excerpt {
    font-size: 13.5px;
    color: var(--tb-text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.tb-thread-meta {
    font-size: 12.5px;
    color: var(--tb-text-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.tb-thread-meta a {
    color: var(--tb-text-light);
    font-weight: 600;
}

.tb-thread-meta a:hover {
    color: var(--tb-primary);
}

.tb-thread-tags {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
}

.tb-tags,
.tags-side {
    display: inline-block;
    padding: 1px 8px;
    margin-right: 2px;
    border-radius: 999px;
    font-size: 11.5px;
    color: var(--tb-text-light);
    background: var(--tb-bg);
    border: 1px solid var(--tb-border);
}

.tb-tags:hover,
.tags-side:hover {
    color: var(--tb-primary);
    border-color: var(--tb-primary);
}

/* 帖子右侧数据列 */
.tb-thread-stats {
    flex-shrink: 0;
    display: flex;
    gap: 18px;
    align-items: center;
}

.tb-thread-stat {
    text-align: center;
    min-width: 46px;
}

.tb-thread-stat b {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--tb-text);
}

.tb-thread-stat span {
    font-size: 11.5px;
    color: var(--tb-text-light);
}

.tb-empty {
    padding: 40px;
    text-align: center;
    color: var(--tb-text-light);
}

/* ---------- 公告条 ---------- */
.tb-announce {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    color: var(--tb-text-light);
    border-left: 3px solid var(--tb-primary);
}

.tb-announce svg {
    flex-shrink: 0;
    color: var(--tb-primary);
}

.tb-announce-text {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    line-height: 1.6;
}

.tb-announce-close {
    flex-shrink: 0;
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: var(--tb-text-light);
    cursor: pointer;
    padding: 0 2px;
}

.tb-announce-close:hover {
    color: var(--tb-text);
}

/* ---------- 帖子类型标记 ---------- */
.tb-flag-type {
    background: #8b5cf6;
}

/* ---------- 顶部发帖按钮 ---------- */
.tb-post-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--tb-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.tb-post-btn:hover {
    color: #fff;
    opacity: .88;
}

/* ---------- 用户中心 ---------- */
.tb-user-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tb-user-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--tb-bg);
    flex-shrink: 0;
}

.tb-user-info {
    flex: 1;
    min-width: 200px;
}

.tb-user-name {
    margin: 0 0 2px;
    font-size: 19px;
    font-weight: 800;
}

.tb-user-desc {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--tb-text-light);
}

.tb-user-stats {
    display: flex;
    gap: 24px;
}

.tb-user-stat b {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--tb-primary);
}

.tb-user-stat span {
    font-size: 12px;
    color: var(--tb-text-light);
}

.tb-user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 128px;
}

.tb-btn-ghost {
    background: var(--tb-bg);
    color: var(--tb-text-light);
    border: 1px solid var(--tb-border);
    text-align: center;
}

.tb-btn-ghost:hover {
    color: var(--tb-primary);
    border-color: var(--tb-primary);
}

.tb-user-posts {
    padding: 20px 24px;
}

.tb-user-posts-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--tb-border);
}

.tb-user-posts-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.tb-user-posts-tip {
    font-size: 12px;
    color: var(--tb-text-light);
}

.tb-user-post-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--tb-border);
    font-size: 14px;
}

.tb-user-post-item:last-child {
    border-bottom: none;
}

.tb-user-post-title {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb-user-post-title:hover {
    color: var(--tb-primary);
}

.tb-user-post-meta {
    flex-shrink: 0;
    font-size: 12.5px;
    color: var(--tb-text-light);
}

.tb-state {
    flex-shrink: 0;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 600;
}

.tb-state-ok {
    color: #16a34a;
    background: rgba(22, 163, 74, .12);
}

.tb-state-pending {
    color: #d97706;
    background: rgba(217, 119, 6, .12);
}

.tb-state-draft {
    color: var(--tb-text-light);
    background: var(--tb-bg);
}

.tb-user-post-empty {
    padding: 32px 0;
    text-align: center;
    color: var(--tb-text-light);
    font-size: 13.5px;
}

@media (max-width: 560px) {
    .tb-user-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tb-user-post-meta {
        display: none;
    }
}

/* ---------- 分页 ---------- */
.pagination {
    text-align: center;
    padding: 8px 0 24px;
}

.pagination a,
.pagination span,
.pagination em {
    display: inline-block;
    min-width: 34px;
    padding: 6px 10px;
    margin: 0 3px;
    border-radius: 8px;
    font-size: 14px;
    font-style: normal;
}

.pagination a {
    color: var(--tb-text-light);
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
}

.pagination a:hover {
    color: var(--tb-primary);
    border-color: var(--tb-primary);
}

.pagination span {
    color: #fff;
    background: var(--tb-primary);
    border: 1px solid var(--tb-primary);
}

.pagination em {
    color: var(--tb-text-light);
}

/* ---------- 话题详情页 ---------- */
.log-con {
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow);
    padding: 28px;
    margin-bottom: 16px;
}

.tb-breadcrumb {
    font-size: 13px;
    color: var(--tb-text-light);
    margin-bottom: 16px;
}

.tb-meta-sort,
.tb-breadcrumb a {
    color: var(--tb-text-light);
}

.tb-meta-sort:hover,
.tb-breadcrumb a:hover {
    color: var(--tb-primary);
}

.tb-topic-title {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
    word-break: break-word;
}

.tb-topic-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13.5px;
    color: var(--tb-text-light);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tb-border);
    margin-bottom: 20px;
}

.tb-topic-meta a {
    font-weight: 600;
}

.tb-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 4px;
}

.tb-topic-edit {
    margin-left: auto;
}

.tb-edit-link {
    color: var(--tb-text-light);
    font-size: 13px;
}

.tb-edit-link:hover {
    color: var(--tb-primary);
}

.tb-topic-cover {
    margin-bottom: 20px;
}

.tb-topic-cover img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.tb-topic-tags {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--tb-border);
}

/* 上一篇 / 下一篇 */
.tb-neighbor {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tb-neighbor-link {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    border-radius: 10px;
    max-width: 46%;
    transition: border-color .2s;
}

.tb-neighbor-link:hover {
    border-color: var(--tb-primary);
}

.neighbor-dir {
    font-size: 12px;
    color: var(--tb-text-light);
}

.neighbor-title {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.next-log {
    text-align: right;
}

/* ---------- 正文排版（Markdown） ---------- */
.markdown {
    font-size: 15.5px;
    line-height: 1.85;
    word-break: break-word;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
    margin: 1.4em 0 .6em;
    font-weight: 700;
    line-height: 1.4;
}

.markdown h1 {
    font-size: 1.5em;
}

.markdown h2 {
    font-size: 1.3em;
    padding-bottom: .3em;
    border-bottom: 1px solid var(--tb-border);
}

.markdown h3 {
    font-size: 1.15em;
}

.markdown p {
    margin: .8em 0;
}

.markdown a {
    color: var(--tb-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.markdown ul,
.markdown ol {
    padding-left: 1.6em;
    margin: .8em 0;
}

.markdown blockquote {
    margin: 1em 0;
    padding: 8px 16px;
    border-left: 3px solid var(--tb-primary);
    background: color-mix(in srgb, var(--tb-primary) 6%, transparent);
    border-radius: 0 8px 8px 0;
    color: var(--tb-text-light);
}

.markdown code {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
    background: rgba(100, 116, 139, .14);
    font-family: "JetBrains Mono", Consolas, Menlo, monospace;
}

.markdown pre {
    margin: 1em 0;
    padding: 14px 16px;
    overflow-x: auto;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .markdown pre {
    background: #020617;
}

.markdown pre code {
    padding: 0;
    background: none;
    color: inherit;
}

.markdown img {
    max-width: 100%;
    border-radius: 8px;
    cursor: zoom-in;
}

.markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.markdown th,
.markdown td {
    border: 1px solid var(--tb-border);
    padding: 8px 12px;
    text-align: left;
}

.markdown th {
    background: var(--tb-bg);
}

.markdown hr {
    border: none;
    border-top: 1px solid var(--tb-border);
    margin: 1.5em 0;
}

.tb-topic-excerpt {
    margin: 16px 0;
    padding: 10px 14px;
    background: var(--tb-bg);
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--tb-text-light);
}

.tb-topic-excerpt summary {
    cursor: pointer;
    font-weight: 600;
}

/* ---------- 评论（回帖） ---------- */
.tb-comments-header {
    font-size: 16px;
    margin: 24px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tb-border);
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
}

.comment .avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-infos {
    flex: 1;
    min-width: 0;
    background: var(--tb-bg);
    border-radius: 10px;
    padding: 12px 14px;
}

.comment-main b {
    font-size: 14px;
}

.comment-main b a {
    color: var(--tb-primary);
}

.comment-time {
    font-size: 12px;
    color: var(--tb-text-light);
    margin-left: 8px;
}

.comment-content {
    font-size: 14.5px;
    margin-top: 4px;
    word-break: break-word;
}

.comment-reply {
    margin-top: 6px;
}

.com-reply {
    border: none;
    background: none;
    color: var(--tb-text-light);
    font-size: 12.5px;
    cursor: pointer;
    padding: 2px 0;
}

.com-reply:hover {
    color: var(--tb-primary);
}

.comment-children {
    margin: 14px 0 0 30px;
}

.comment-children .avatar img {
    width: 32px;
    height: 32px;
}

.comment-children .comment-infos {
    padding: 10px 12px;
}

/* 评论表单 */
.comment-post {
    margin-bottom: 20px;
}

.commentform textarea,
.commentform input[type="text"],
.commentform input[type="email"],
.commentform input[type="url"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    background: var(--tb-card);
    color: var(--tb-text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .2s;
}

.commentform textarea:focus,
.commentform input:focus {
    outline: none;
    border-color: var(--tb-primary);
}

.comment-info {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.comment-info .form-control {
    flex: 1;
    min-width: 160px;
}

.captcha-container {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-container input {
    max-width: 160px;
}

.captcha-container img {
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
}

.com_submit_p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.tb-btn,
.btn {
    display: inline-block;
    padding: 9px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .2s, transform .1s;
}

.tb-btn:hover,
.btn:hover {
    opacity: .88;
}

.tb-btn:active,
.btn:active {
    transform: translateY(1px);
}

.tb-btn-primary,
#comment_submit {
    color: #fff;
    background: var(--tb-primary);
}

.cancel-reply {
    display: none;
    background: var(--tb-bg);
    color: var(--tb-text-light);
    border: 1px solid var(--tb-border);
}

#pagenavi {
    margin-top: 10px;
    text-align: center;
}

#pagenavi a,
#pagenavi span {
    display: inline-block;
    min-width: 30px;
    padding: 5px 9px;
    margin: 0 2px;
    border-radius: 6px;
    font-size: 13px;
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    color: var(--tb-text-light);
}

#pagenavi a:hover {
    color: var(--tb-primary);
    border-color: var(--tb-primary);
}

#pagenavi span {
    color: #fff;
    background: var(--tb-primary);
    border-color: var(--tb-primary);
}

/* ---------- 侧边栏 ---------- */
.side-bar .widget {
    margin-bottom: 16px;
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow);
    padding: 16px;
}

.side-bar .widget-title {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--tb-border);
}

.side-bar .widget-title h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    position: relative;
    padding-left: 12px;
}

.side-bar .widget-title h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--tb-primary);
}

.unstyle-li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tb-widget-link {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 13.5px;
}

.tb-widget-link img {
    margin-right: 8px;
    border-radius: 4px;
}

.tb-widget-link a {
    color: var(--tb-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-widget-link a:hover {
    color: var(--tb-primary);
}

.tb-bloggerinfo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tb-bloggerinfo-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.bloginfo-name {
    font-size: 15px;
}

.bloginfo-descript {
    width: 100%;
    font-size: 12.5px;
    color: var(--tb-text-light);
}

.tb-tag-container {
    line-height: 2.4;
}

.tb-classify li {
    padding: 5px 0;
    font-size: 13.5px;
}

.tb-classify a {
    color: var(--tb-text-light);
}

.tb-classify a:hover {
    color: var(--tb-primary);
}

.tb-classify-c {
    list-style: none;
    padding-left: 12px;
}

.tb-side-twitter-item,
.tb-side-comment-item {
    font-size: 13px;
    padding: 4px 0;
}

.tb-side-twitter-item hr,
.tb-side-comment-item hr {
    border: none;
    border-top: 1px dashed var(--tb-border);
    margin: 8px 0 2px;
}

.tb-side-twitter-content {
    color: var(--tb-text-light);
    margin-top: 4px;
}

.tb-side-comment-item a {
    color: var(--tb-text-light);
    display: inline-block;
    margin-top: 2px;
}

.tb-side-comment-item a:hover {
    color: var(--tb-primary);
}

.comm-lates-name {
    font-weight: 600;
}

.logcom-latest-time {
    float: right;
    font-size: 11.5px;
    color: var(--tb-text-light);
}

.tb-side-list li {
    padding: 6px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed var(--tb-border);
}

.tb-side-list li:last-child {
    border-bottom: none;
}

.tb-side-list a {
    color: var(--tb-text-light);
}

.tb-side-list a:hover {
    color: var(--tb-primary);
}

.tb-side-cover {
    position: relative;
    height: 64px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.tb-side-title {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, .75), transparent);
    display: flex;
    align-items: flex-end;
    padding: 8px 10px;
}

.tb-side-title a {
    color: #fff;
    font-size: 12.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.tb-widget-search form {
    display: flex;
    gap: 8px;
}

.tb-widget-search input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    background: var(--tb-bg);
    color: var(--tb-text);
}

.tb-widget-search input[type="search"]:focus {
    outline: none;
    border-color: var(--tb-primary);
}

.tb-widget-search input[type="submit"] {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: var(--tb-primary);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

.tb-archive {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    background: var(--tb-bg);
    color: var(--tb-text);
}

/* ---------- 页脚 ---------- */
.tb-footer {
    margin-top: 40px;
    border-top: 1px solid var(--tb-border);
    background: var(--tb-card);
    padding: 24px 0 32px;
    transition: background-color .3s;
}

.tb-footer-slogan {
    text-align: center;
    font-size: 14px;
    color: var(--tb-text-light);
    margin-bottom: 10px;
}

.tb-footer-info {
    text-align: center;
    font-size: 12.5px;
    color: var(--tb-text-light);
}

.tb-footer-info a {
    color: var(--tb-text-light);
}

.tb-footer-info a:hover {
    color: var(--tb-primary);
}

/* ---------- 右侧悬浮工具条 ---------- */
.side-toolbar {
    position: fixed;
    right: 18px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 90;
}

.side-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--tb-text-light);
    transition: color .2s, border-color .2s;
}

.side-btn:hover {
    color: var(--tb-primary);
    border-color: var(--tb-primary);
}

.icon-sun {
    display: none;
}

[data-theme="dark"] .icon-sun {
    display: block;
}

[data-theme="dark"] .icon-moon {
    display: none;
}

/* ---------- 登录 / 注册弹窗 ---------- */
.auth-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 200;
}

.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 88vh;
    overflow-y: auto;
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.auth-modal-card {
    padding: 24px;
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: none;
    font-size: 22px;
    color: var(--tb-text-light);
    cursor: pointer;
    line-height: 1;
}

.auth-modal-head h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.auth-modal-alert {
    margin-bottom: 8px;
    font-size: 13px;
    color: #ef4444;
}

.auth-form-row {
    margin-bottom: 12px;
}

.auth-form-row input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tb-border);
    border-radius: 8px;
    background: var(--tb-bg);
    color: var(--tb-text);
    font-size: 14px;
    font-family: inherit;
}

.auth-form-row input:focus {
    outline: none;
    border-color: var(--tb-primary);
}

.auth-captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-captcha-row input {
    flex: 1;
}

.auth-captcha-row img {
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
}

.auth-inline-row {
    display: flex;
    gap: 10px;
}

.auth-inline-row input {
    flex: 1;
}

.auth-inline-btn {
    background: var(--tb-primary);
    color: #fff;
    white-space: nowrap;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tb-text-light);
    margin-bottom: 14px;
}

.auth-submit {
    width: 100%;
    background: var(--tb-primary);
    color: #fff;
}

.auth-modal-switch {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.auth-modal-switch a {
    color: var(--tb-primary);
}

.auth-switch-links {
    text-align: center;
    font-size: 13px;
    margin-bottom: 12px;
    color: var(--tb-text-light);
}

.auth-switch-link {
    color: var(--tb-text-light);
}

.auth-switch-link.active {
    color: var(--tb-primary);
    font-weight: 600;
}

.auth-switch-sep {
    margin: 0 8px;
    color: var(--tb-border);
}

/* 评论时挂到楼层里的表单 */
.comment-infos #comment-post,
.comment-children #comment-post {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 0;
}

.comment-infos .commentform textarea {
    background: var(--tb-card);
}

/* ---------- 404 ---------- */
.tb-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.tb-404-card {
    background: var(--tb-card);
    border: 1px solid var(--tb-border);
    border-radius: 16px;
    box-shadow: var(--tb-shadow-hover);
    text-align: center;
    max-width: 460px;
    width: 90%;
    padding: 48px 32px;
}

.tb-404-code {
    margin: 0;
    font-size: 72px;
    font-weight: 800;
    line-height: 1;
    color: var(--tb-primary);
    opacity: .25;
}

.tb-404-msg {
    margin: 14px 0 24px;
    color: var(--tb-text-light);
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .row {
        flex-direction: column;
    }

    .column-small {
        width: 100%;
    }

    .blog-header-toggle {
        display: block;
    }

    .blog-header-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 260px;
        max-width: 78vw;
        background: var(--tb-card);
        border-left: 1px solid var(--tb-border);
        transform: translateX(100%);
        transition: transform .3s;
        z-index: 99;
        overflow-y: auto;
        padding: 20px;
        margin: 0;
    }

    .blog-header-nav.show {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav-link {
        display: block;
        padding: 10px 12px;
    }

    .dropdown-menus {
        position: static;
        box-shadow: none;
        border: none;
        display: block;
        padding: 0 0 0 12px;
        margin: 0;
    }

    .tb-thread {
        flex-wrap: wrap;
    }

    .tb-thread-stats {
        width: 100%;
        justify-content: flex-start;
        margin-left: 60px;
    }

    .tb-neighbor-link {
        max-width: 100%;
    }

    .log-con {
        padding: 20px 16px;
    }

    .tb-topic-title {
        font-size: 21px;
    }

    .comment-children {
        margin-left: 14px;
    }
}

@media (max-width: 560px) {
    .tb-stats-item b {
        font-size: 17px;
    }

    .tb-thread-stats {
        margin-left: 0;
        gap: 14px;
    }

    .tb-thread-avatar img {
        width: 38px;
        height: 38px;
    }

    .side-toolbar {
        right: 10px;
        bottom: 60px;
    }
}
