/* =========================================================
   Panther × Xiuno 适配层
   原版 panther.css 按目标站的 CMS 编写，这里只补 Xiuno 特有的差异，
   不改动任何版面数值，保证视觉与目标站一致。
   ========================================================= */

/* bootstrap 4 默认 a:hover 会加下划线，纸面风格不要这个 */
a, a:hover, a:focus { text-decoration: none; }

/* bootstrap-bbs.css 把 body 设为 flex 列，margin:0 auto 会触发 auto-margin 收缩，
   整页会被挤成内容宽度，必须显式撑满 */
.pt-wrap { width: 100%; }

/* 同一份 flex 规则还给 html/body 加了 height:100%，body 高度被锁死成一屏。
   sticky 的吸附范围受「父容器高度」限制，父容器只有一屏，滚过一屏顶栏就跟着走掉了。
   改成 min-height 让 body 随内容长高，顶栏才能全程粘住。 */
html { height: auto; min-height: 100%; }
body { height: auto; min-height: 100vh; }

/* 站标：跟站名同一视觉重量。
   .pt-brand 原本是 align-items: baseline（留给「站名 + 小标」的排版），
   图片没有基线，会被压到底线上，看着比文字"往下坠"，所以整块改成居中。
   间距也从 6px 放到 10px，图形贴着字会显得挤。 */
.pt-brand { align-items: center; gap: 10px; }
.pt-brand-logo { flex: none; display: block; width: 28px; height: 28px; border-radius: 7px; }
[data-theme="dark"] .pt-brand-logo { box-shadow: 0 0 0 1px var(--rule); }

/* 已读 / 未读主题：原样式只有 --ink → --soft 一级之差，一屏扫过去几乎分不出来。
   未读压到最深、已读提到最浅，各拉一档；深色模式反过来（暗底上要更亮才"更黑"）。
   :not(.is-top) 是为了不盖掉置顶帖的红色。 */
:root { --thread-unread: #12100c; --thread-read: #aca595; }
:root[data-theme="dark"] { --thread-unread: #f4efe3; --thread-read: #6a645a; }
.pt-thread:not(.is-top) .pt-thread-title a { color: var(--thread-unread); }
.pt-thread:not(.is-top) .pt-thread-title a:visited { color: var(--thread-read); }

/* 深浅色按钮：当前是哪套配色就显示哪个图标（浅色=太阳，深色=月亮） */

/* 深浅色按钮：当前是哪套配色就显示哪个图标（浅色=太阳，深色=月亮） */
#pt-theme-toggle .pt-i-sun { display: block; }
#pt-theme-toggle .pt-i-moon { display: none; }
[data-theme="dark"] #pt-theme-toggle .pt-i-sun { display: none; }
[data-theme="dark"] #pt-theme-toggle .pt-i-moon { display: block; }

/* 版主批量操作：默认隐藏，进入管理模式才出现 */
.pt-thread.has-mod { position: relative; }
.pt-mod-check { display: none; position: absolute; left: 0; top: 50%; transform: translateY(-50%); margin: 0; cursor: pointer; line-height: 0; }
.pt-mod-check input { width: 13px; height: 13px; margin: 0; accent-color: var(--red); cursor: pointer; }
body.is-moding .pt-mod-check { display: inline-flex; }
body.is-moding .pt-thread { padding-left: 22px; }

/* 批量操作条：吸底胶囊 */
.pt-modbar {
	display: none;
	position: sticky;
	bottom: 16px;
	z-index: 40;
	align-items: center;
	gap: 8px;
	width: fit-content;
	max-width: 100%;
	margin: 14px auto 0;
	padding: 7px 10px 7px 14px;
	background: color-mix(in srgb, var(--card) 94%, transparent);
	backdrop-filter: blur(10px);
	border: 1px solid var(--rule);
	border-radius: 999px;
	box-shadow: 0 14px 36px rgba(0, 0, 0, .14);
	font-size: 13.5px;
}
body.is-moding .pt-modbar { display: flex; }
.pt-modbar-all { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--soft); cursor: pointer; }
.pt-modbar-all input { width: 13px; height: 13px; margin: 0; accent-color: var(--red); cursor: pointer; }
.pt-modbar-count { color: var(--soft); white-space: nowrap; }
.pt-modbar-count b { color: var(--red); font-family: var(--mono); }
.pt-modbar-sep { width: 1px; height: 16px; background: var(--line); }
.pt-modbar .pt-btn { margin: 0; }
.pt-modbar .pt-btn.delete:hover { color: #fff; background: var(--red); border-color: var(--red); }
.pt-link-btn { padding: 0; background: none; border: 0; color: var(--soft); font-size: 13px; cursor: pointer; }
.pt-link-btn:hover { color: var(--red); }

/* 空列表 */
.pt-empty { padding: 56px 20px; text-align: center; font-size: 14px; color: var(--faint); list-style: none; }

/* 提示 / 跳转页 */
.pt-msg { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 24px; text-align: center; }
.pt-msg-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; }
.pt-msg-icon.is-ok { color: var(--green); background: rgba(61, 122, 74, .1); }
.pt-msg-icon.is-err { color: var(--red); background: var(--red-bg); }
.pt-msg-text { max-width: 560px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.pt-msg-text a { color: var(--red); }

/* Xiuno 帖子页沿用目标站结构后，评论数锚点 */
#comments { scroll-margin-top: calc(var(--top) + 12px); }

/* ---------- 尚未重写模板的页面：登录 / 注册 / 个人中心 / 发帖，统一到纸面质感 ---------- */

.pt-main > .card,
.pt-main > .row > .card,
#body .card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: none;
	color: var(--text);
}
.card-header { background: transparent; border-bottom: 1px solid var(--line); }
.card-footer { background: transparent; border-top: 1px solid var(--line); }
.card-title { font-family: var(--serif); color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 16px; font-size: 14px; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 17px; box-shadow: none; }
.btn:hover { color: var(--ink); border-color: var(--ink); background: var(--card); }
.btn-primary, .btn-success { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn-primary:hover, .btn-success:hover { color: #fff; background: var(--red); border-color: var(--red); }
.btn-danger { color: #fff; background: var(--red); border-color: var(--red); }
.btn-secondary, .btn-default { color: var(--text); background: var(--fill); border-color: var(--line); }
.btn-sm { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }

.form-control { height: 38px; padding: 0 12px; font-size: 14px; color: var(--text); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: none; }
.form-control:focus { color: var(--text); background: var(--card); border-color: var(--ink); box-shadow: none; }
textarea.form-control { height: auto; padding: 10px 12px; line-height: 1.7; }
.form-control::placeholder { color: var(--faint); }
label, .col-form-label { font-size: 13.5px; color: var(--soft); }
.custom-select, select.form-control { height: 38px; }
.input-group-text { background: var(--fill); border: 1px solid var(--rule); color: var(--soft); }

.nav-tabs { border-bottom: 1px solid var(--line); }
.nav-tabs .nav-link { padding: 7px 14px; font-size: 14px; color: var(--soft); border: 0; border-radius: 6px; }
.nav-tabs .nav-link.active { color: var(--red); background: var(--red-bg); font-weight: 600; }

.table { color: var(--text); }
.table th, .table td { border-top: 1px solid var(--line); font-size: 14px; }
.table thead th { border-bottom: 1px solid var(--rule); color: var(--soft); }

.alert { background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-size: 14px; }
.alert-danger { background: var(--red-bg); border-color: transparent; color: var(--red); }
.alert-success { background: rgba(61, 122, 74, .1); border-color: transparent; color: var(--green); }

.badge { font-size: 11.5px; font-weight: 600; padding: 3px 7px; border-radius: 4px; }
.badge-secondary, .badge-light { color: var(--soft); background: var(--fill); }
.badge-primary { background: var(--ink); color: var(--paper); }
.badge-danger { background: var(--red); color: #fff; }

.modal-content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .18); }
.modal-header, .modal-footer { border-color: var(--line); }
.modal-title { font-family: var(--serif); }

.dropdown-menu { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }
.dropdown-item { font-size: 14px; color: var(--text); }
.dropdown-item:hover { background: var(--fill); color: var(--ink); }

.text-muted, .text-grey { color: var(--faint) !important; }
.text-body { color: var(--text) !important; }
.bg-white, .bg-light { background: var(--card) !important; }
.break-all { word-break: break-all; }

/* Xiuno 自带分页（部分页面仍在用）→ 目标站分页外观 */
.pt-main .pagination { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0; padding: 0; list-style: none; }
.pt-main .pagination .page-item .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 9px; font-size: 13px; color: var(--soft); background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.pt-main .pagination .page-item .page-link:hover { color: var(--ink); background: var(--fill); border-color: var(--rule); }
.pt-main .pagination .page-item.active .page-link { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* 发帖 / 回帖编辑器容器 */
.pt-main .card-postlist, .pt-main .card-thread { padding: 0; }
.postlist .media { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pt-main .message { font-size: 15px; line-height: 1.85; }
.pt-main .message img { max-width: 100%; border-radius: 6px; }
.pt-main .message blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--rule); background: var(--fill); color: var(--soft); }
.pt-main .message pre { padding: 12px 14px; background: var(--fill); border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: 13px; overflow-x: auto; }
.pt-main .message table { width: 100%; border-collapse: collapse; }
.pt-main .message table td, .pt-main .message table th { border: 1px solid var(--line); padding: 6px 10px; }

/* 版主操作条 */
.mod-button .btn { margin: 0 2px; }

/* 响应式：Xiuno 原模板的隐藏类 */
@media (max-width: 767px) {
	.hidden-sm { display: none !important; }
}

/* ---------- 抹掉 Bootstrap 默认的蓝色系（这是"看着怪"的主因） ---------- */

.list-group-item { padding: 9px 14px; background: var(--card); border-color: var(--line); color: var(--text); font-size: 14px; }
.list-group-item + .list-group-item { border-top: 1px solid var(--line); }
.list-group-item-action:hover, .list-group-item-action:focus { background: var(--fill); color: var(--ink); }
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus { color: var(--ink); background: var(--fill); border-color: var(--line); box-shadow: inset 2px 0 0 var(--red); font-weight: 600; }
.list-group-item.disabled { color: var(--faint); background: var(--card); }

.text-primary { color: var(--red) !important; }
.text-danger { color: var(--red) !important; }
.text-success { color: var(--green) !important; }
.text-info { color: var(--blue) !important; }
.text-warning { color: #b07d2b !important; }
.bg-primary { background: var(--ink) !important; }
.bg-secondary { background: var(--fill) !important; }
.bg-info, .bg-danger { background: var(--red-bg) !important; color: var(--red) !important; }

.input-group > .input-group-prepend > .input-group-text,
.input-group > .input-group-append > .input-group-text { height: 38px; border-radius: var(--radius) 0 0 var(--radius); font-size: 13.5px; }
.input-group > .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-text { background: var(--fill); border-color: var(--rule); color: var(--soft); }

.form-control:disabled, .form-control[readonly] { background: var(--fill); color: var(--soft); }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--red); border-color: var(--red); }
.custom-control-label::before { background-color: var(--card); border-color: var(--rule); }
.custom-select:focus, .form-control:focus { border-color: var(--ink); }

.nav-pills .nav-link { color: var(--soft); border-radius: var(--radius); }
.nav-pills .nav-link.active { background: var(--fill); color: var(--ink); }
.dropdown-item.active, .dropdown-item:active { background: var(--fill); color: var(--ink); }
.breadcrumb { background: transparent; padding: 0; margin: 0 0 12px; font-size: 13px; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--faint); }
.breadcrumb-item.active { color: var(--soft); }

.btn-link { color: var(--soft); border: 0; background: none; }
.btn-link:hover { color: var(--red); }
.close { color: var(--soft); text-shadow: none; opacity: .7; }
.close:hover { color: var(--ink); opacity: 1; }
.progress { background: var(--fill); border-radius: 6px; }
.progress-bar { background: var(--ink); }
.page-link { color: var(--soft); background: var(--card); border-color: var(--line); }
.page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.alert-info { background: rgba(47, 111, 184, .08); border-color: transparent; color: var(--blue); }
.alert-warning { background: rgba(176, 125, 43, .1); border-color: transparent; color: #8a6220; }

.table-striped tbody tr:nth-of-type(odd) { background: var(--fill); }
.table-hover tbody tr:hover { background: var(--hover); }

/* 编辑器：贴图区与工具栏 */
.pt-main textarea.form-control { min-height: 220px; }
.pt-main .btn-toolbar .btn { border-radius: 14px; }
.pt-main .upload-file-list, .pt-main .attachlist { font-size: 13.5px; color: var(--soft); }
.pt-main .attachlist .attach { padding: 8px 12px; margin: 6px 0; background: var(--fill); border: 1px solid var(--line); border-radius: var(--radius); }
.pt-main code { padding: 2px 6px; font-size: 13px; color: var(--red); background: var(--fill); border-radius: 4px; }
.pt-main .icon { vertical-align: -1px; }
.pt-main .icon-ok { color: var(--green); }
.pt-main .icon-warning-sign { color: var(--red); }

/* ============ 个人中心 ============ */
/* 个人中心：标签页并进资料卡，用一条细线分隔 */
.pt-my-tabs { margin: 0; padding: 0 12px; border-top: 1px solid var(--line); border-bottom: 0; }
/* 标签卡和紧跟其后的内容卡拼成一张，中间不留空行 */
.pt-main > .pt-profile.is-tabbed { border-radius: var(--radius) var(--radius) 0 0; }
.pt-main > .pt-profile.is-tabbed + .pt-panel { margin-top: -14px; border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
/* 资料列表：一行「标签 — 值」，不再画成表格 */
.pt-kv { display: block; margin: 0; background: none; }
.pt-kv > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 12px 20px; background: none; box-shadow: none; border-bottom: 1px solid var(--line); }
.pt-kv > div:last-child { border-bottom: 0; }
.pt-kv dt { margin: 0; font-size: 13px; color: var(--faint); font-weight: 400; }
.pt-kv dd { margin: 0; font-size: 14px; color: var(--ink); word-break: break-all; }
.pt-my-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 22px; max-width: 460px; }
.pt-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pt-field > span { font-size: 13px; color: var(--soft); }
.pt-field .invalid-feedback { display: none; font-size: 12.5px; color: var(--red); }
.pt-field.has-error .invalid-feedback { display: block; }
.pt-my-form-act { padding-top: 4px; }
.pt-my-avatar { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 20px 30px; }
.pt-my-avatar .pt-avatar { width: 96px; height: 96px; border: 1px solid var(--line); }
.pt-file-hidden { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.pt-progress { width: 220px; height: 5px; background: var(--fill); border-radius: 3px; overflow: hidden; }
.pt-progress-bar { height: 100%; background: var(--red); transition: width .2s; }
.pt-my-hint { margin: 0; font-size: 12.5px; color: var(--faint); text-align: center; }

/* ============ 分享弹窗 ============ */
.pt-modal[hidden] { display: none !important; }
body.is-modal { overflow: hidden; }
.pt-poster-title { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); margin-bottom: 16px; }
.pt-poster-tip:empty { display: none; }
.pt-poster-act .pt-btn[data-share="wechat"] { background: rgba(61, 122, 74, .14); border-color: rgba(61, 122, 74, .22); color: #2f5f3c; }
.pt-poster-act .pt-btn[data-share="qq"] { background: rgba(47, 111, 184, .12); border-color: rgba(47, 111, 184, .2); color: #2f6fb8; }
.pt-poster-act .pt-btn[data-share="weibo"] { background: rgba(216, 80, 48, .12); border-color: rgba(216, 80, 48, .2); color: #c2452a; }
.pt-poster-act .pt-btn[data-share="copy"] { background: var(--fill); border-color: var(--rule); }
.pt-field input.form-control-danger { border-color: var(--red); }

/* ============ 版主批量操作弹窗（AJAX 载入到 bootstrap modal 里）============ */
.pt-mod-card { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.pt-mod-form { display: flex; flex-direction: column; gap: 18px; padding: 2px 2px 4px; }
.pt-mod-field { display: flex; flex-direction: column; gap: 8px; }
.pt-mod-label { font-size: 12px; letter-spacing: .02em; color: var(--faint); }
.pt-mod-count { margin: 0; font-size: 14px; color: var(--soft); white-space: nowrap; }
.pt-mod-count b.total { margin-right: 2px; font-family: var(--mono); font-size: 18px; color: var(--red); }
.pt-mod-tip { margin: 0; padding: 10px 12px; font-size: 13px; line-height: 1.6; color: #a8402b; background: var(--red-bg); border-radius: var(--radius); }
.pt-mod-radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.pt-mod-radios label { position: relative; display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 10px; font-size: 13.5px; color: var(--soft); white-space: nowrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.pt-mod-radios label:hover { color: var(--ink); border-color: var(--rule); }
.pt-mod-radios label:has(input:checked) { color: var(--red); background: var(--red-bg); border-color: var(--red); font-weight: 600; }
.pt-mod-radios input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.pt-select { width: 100%; height: 40px; padding: 0 10px; font-size: 14px; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.pt-mod-act { display: flex; gap: 10px; padding-top: 2px; justify-content: flex-end; }
.pt-mod-act .pt-btn { min-width: 96px; height: 40px; padding: 0 18px; }
