/* 巅峰魔力 3.7 官方 BBS 论坛样式 — 1:1 复刻 Discuz! X3.4 + wekei_free_acg_01 二次元桃红风格 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  background: #f5f7fa url("/static/bg_body.jpg?v=2") no-repeat top center;
  background-size: 100% 320px;
  color: #444444;
  font-family: Tahoma, "Microsoft YaHei", "PingFang SC", "SimSun", sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

body.narrow-mode .wp,
body.narrow-mode .wp_1240 {
  width: 1200px;
  min-width: 1000px;
}

a {
  color: #333333;
  text-decoration: none;
}

a:hover {
  color: #ff6600;
  text-decoration: underline;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 顶部半透明白工具条 #toptb */
#toptb {
  height: 43px;
  line-height: 43px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(220, 224, 232, 0.85);
  backdrop-filter: blur(4px);
}

.wp {
  width: 96%;
  min-width: 1024px;
  max-width: 1840px;
  margin: 0 auto;
}

.wp_1240 {
  width: 96%;
  min-width: 1024px;
  max-width: 1840px;
  min-height: calc(100dvh - 200px);
  margin: 0 auto 24px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 5px 14px 3px rgba(0, 0, 0, 0.08);
  padding: 0 22px 24px;
}

.toptb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toptb-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toptb-links a,
.toptb-links button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #333;
  cursor: pointer;
}

.toptb-links a:hover,
.toptb-links button:hover {
  color: #ff9900;
  text-decoration: underline;
}

/* Header #hd：顶部留白 150px 露出二次元天空法兰城背景 */
#hd {
  margin-top: 138px;
}

.hd-card {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(6px);
  border-radius: 10px 10px 0 0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.hd-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
}

.hd-logo-mark {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fc5679 0%, #d42668 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(212, 38, 104, 0.35);
}

.hd-logo-text strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 900;
  color: #222222;
  letter-spacing: 3px;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", "Microsoft YaHei", serif;
}

.hd-logo-text span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  letter-spacing: 2px;
  color: #7a8190;
}

/* Header 右侧精简登录表单 */
.hd-auth-form {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 6px 10px;
  align-items: center;
}

.hd-auth-input {
  width: 145px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #cfd6e0;
  border-radius: 3px;
  background: #ffffff;
  font-size: 12px;
}

.hd-btn {
  height: 26px;
  padding: 0 12px;
  border-radius: 3px;
  border: 1px solid #d42668;
  background: #fc5679;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.hd-btn:hover {
  background: #d42668;
}

.hd-btn-ghost {
  background: #fff;
  color: #d42668;
}

.hd-btn-ghost:hover {
  background: #fff0f4;
  color: #b81d58;
}

.hd-user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #e6eaf0;
}

.hd-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fc5679, #ff9966);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 高 50px 吸顶桃红主导航 #nv */
#nv {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 50px;
  background: #fc5679;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 3px 10px rgba(212, 38, 104, 0.22);
}

#nv ul {
  display: flex;
  align-items: stretch;
  height: 50px;
}

#nv li a {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 22px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

#nv li.active a,
#nv li a:hover {
  background: #d42668;
  color: #ffffff;
}

.nv-quick-wrap {
  position: relative;
}

.nv-quick-btn {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #d42668;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.nv-quick-menu {
  position: absolute;
  right: 0;
  top: 40px;
  width: 200px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  padding: 8px 0;
  display: none;
}

.nv-quick-menu.open {
  display: block;
}

.nv-quick-menu a {
  display: block;
  padding: 8px 16px;
  color: #333;
  font-size: 13px;
}

.nv-quick-menu a:hover {
  background: #fff1f5;
  color: #d42668;
  text-decoration: none;
}

/* 搜索条 #scbar */
#scbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eeeeee;
}

.scbar-form {
  display: flex;
  align-items: center;
  border: 2px solid #fc5679;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.scbar-input {
  width: 280px;
  height: 32px;
  border: 0;
  padding: 0 14px;
  font-size: 13px;
  outline: none;
}

.scbar-type {
  padding: 0 10px;
  color: #777;
  border-left: 1px solid #eee;
  font-size: 12px;
}

.scbar-btn {
  width: 44px;
  height: 32px;
  border: 0;
  background: #fc5679;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.scbar-btn:hover {
  background: #ff6600;
}

.scbar-hot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #999;
}

.scbar-hot strong {
  color: #ff6600;
}

.scbar-hot a {
  color: #666;
}

.scbar-hot a:hover {
  color: #fc5679;
}

/* 统计条 #chart */
#chart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  color: #666;
}

.chart-stats em {
  font-style: normal;
  font-weight: 700;
  color: #333;
}

.pipe {
  margin: 0 8px;
  color: #cccccc;
}

/* 四格展示区 #category_grid */
#category_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #e6e8ec;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 16px;
}

.grid-col {
  border-right: 1px solid #eeeeee;
  min-width: 0;
}

.grid-col:last-child {
  border-right: 0;
}

.grid-col h4 {
  margin: 0;
  height: 36px;
  line-height: 36px;
  padding: 0 12px;
  background: #f8f8f8;
  border-bottom: 1px solid #eeeeee;
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
}

.grid-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fc5679;
}

.grid-pic-box {
  padding: 10px;
  position: relative;
}

.grid-pic-stage {
  display: block;
  width: 100%;
  height: 226px;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  background: #1a1f2e;
}

.grid-pic-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-pic-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #fff;
  font-size: 12px;
}

.grid-pic-nums {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.grid-pic-num {
  width: 20px;
  height: 20px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  color: #555;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}

.grid-pic-num.active {
  background: #fc5679;
  border-color: #d42668;
  color: #fff;
  font-weight: 700;
}

.grid-list {
  padding: 8px 12px;
}

.grid-list li {
  height: 26px;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px dashed #f0f0f0;
}

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

.grid-list li::before {
  content: "· ";
  color: #fc5679;
  font-weight: 900;
}

/* 分区与版块表格 .bmw */
.bmw {
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 16px;
}

.bm_h {
  height: 40px;
  line-height: 40px;
  padding: 0 16px;
  background: linear-gradient(180deg, #f7f8fa 0%, #ededf0 100%);
  border-bottom: 1px solid #dddddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bm_h h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.fl_tb {
  width: 100%;
  border-collapse: collapse;
}

.fl_tb tr {
  border-bottom: 1px dashed #e5e7eb;
}

.fl_tb tr:last-child {
  border-bottom: 0;
}

.fl_tb tr:hover {
  background: #fff9fb;
}

.fl_tb td {
  padding: 14px 12px;
  vertical-align: middle;
}

.fl_icn {
  width: 170px;
}

.forum-badge-img {
  width: 150px;
  height: 68px;
  border-radius: 8px;
  display: block;
}

.fl_name a {
  font-size: 16px;
  font-weight: 700;
  color: #2563eb;
}

.fl_name a:hover {
  color: #d42668;
}

.fl_desc {
  margin-top: 4px;
  color: #777;
  font-size: 12px;
}

.fl_stat {
  width: 110px;
  text-align: center;
  font-size: 13px;
  color: #666;
}

.fl_stat strong {
  color: #1d4ed8;
}

.fl_last {
  width: 280px;
  font-size: 12px;
  color: #666;
}

.fl_last a {
  display: block;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
  font-weight: 600;
}

.fl_last span {
  color: #999;
}

/* 面包屑与操作条 */
#pt {
  padding: 10px 0;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pgt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-post {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}

.btn-post:hover {
  filter: brightness(1.07);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  color: #444;
}

/* 版块主题列表表格 */
.thread-table {
  width: 100%;
  border-collapse: collapse;
}

.thread-table th {
  background: #f5f6f8;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #dfe3e8;
  color: #666;
  font-weight: 600;
}

.thread-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f3;
}

.thread-table tr:hover td {
  background: #fff9fb;
}

.tag-pin {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  margin-right: 5px;
}

.tag-digest {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  margin-right: 5px;
}

/* 1:1 复刻帖子详情双栏楼层表 #postlist */
#postlist {
  border: 1px solid #d8dde6;
  border-radius: 4px;
  background: #ffffff;
  margin-bottom: 16px;
}

.post-title-row {
  display: flex;
  border-bottom: 4px solid #e5edf2;
}

.post-title-stats {
  width: 160.5px;
  flex: none;
  background: #f8f8f8;
  border-right: 1px solid #cccccc;
  padding: 12px 10px;
  text-align: center;
  color: #777;
  font-size: 12px;
}

.post-title-stats strong {
  color: #fc5679;
}

.post-title-main {
  flex: 1;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-title-main h1 {
  margin: 0;
  font-size: 18px;
  color: #222;
  line-height: 1.4;
}

.post-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 12px;
}

.post-floor {
  display: flex;
  border-bottom: 4px solid #e5edf2;
}

.post-floor:last-child {
  border-bottom: 0;
}

/* 左侧 160.5px 用户信息栏 .pls */
.pls {
  width: 160.5px;
  flex: none;
  background: #f8f8f8;
  border-right: 1px solid #cccccc;
  padding: 14px 12px;
}

.pls-username {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px dashed #d5d9df;
}

.pls-avatar-box {
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
  padding: 5px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pls-avatar-inner {
  width: 108px;
  height: 108px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 32px;
}

.pls-avatar-inner small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 4px;
}

.pls-stats {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  text-align: center;
}

.pls-stats td {
  border-right: 1px solid #e0e3e8;
  padding: 2px 2px;
  font-size: 11px;
  color: #777;
}

.pls-stats td:last-child {
  border-right: 0;
}

.pls-stats strong {
  display: block;
  color: #333;
  font-size: 12px;
}

.pls-group {
  font-size: 12px;
  color: #333;
  margin-bottom: 4px;
}

.pls-stars {
  color: #f59e0b;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.pls-pm {
  display: inline-block;
  color: #2563eb;
  font-size: 12px;
}

/* 右侧正文区 .plc */
.plc {
  flex: 1;
  min-width: 0;
  padding: 0 20px 14px;
  display: flex;
  flex-direction: column;
}

.pi {
  height: 38px;
  line-height: 38px;
  border-bottom: 1px dashed #d6dbe2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #666;
  margin-bottom: 14px;
}

.pi-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.floor-badge {
  font-weight: 700;
  color: #d42668;
}

.elevator-input {
  width: 50px;
  height: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 0 5px;
  font-size: 11px;
}

.t_f {
  font-size: 14px;
  line-height: 1.9;
  color: #222222;
  min-height: 140px;
  word-break: break-word;
}

.t_f a {
  color: #2563eb;
  text-decoration: underline;
}

.bb-quote {
  margin: 10px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 4px solid #fc5679;
  color: #555;
  border-radius: 0 4px 4px 0;
}

.plc-fav-row {
  text-align: center;
  margin: 22px 0 12px;
}

.btn-fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #444;
  cursor: pointer;
  font-size: 13px;
}

.btn-fav:hover,
.btn-fav.active {
  border-color: #fc5679;
  color: #d42668;
  background: #fff1f5;
}

.plc-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #777;
}

/* 快速回复编辑器 #f_pst */
#f_pst {
  border: 1px solid #d8dde6;
  border-radius: 4px;
  background: #ffffff;
  margin-bottom: 16px;
}

.fpst-head {
  height: 36px;
  line-height: 36px;
  padding: 0 14px;
  background: #f5f7fa;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
}

.fpst-toolbar {
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fpst-tool {
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}

.fpst-tool:hover {
  border-color: #fc5679;
  color: #d42668;
}

.fpst-textarea {
  width: 100%;
  min-height: 120px;
  border: 0;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  outline: none;
}

.fpst-foot {
  padding: 10px 14px;
  border-top: 1px solid #eef0f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 在线会员、友链、页脚与悬浮条 */
#online,
.lk {
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  background: #ffffff;
  margin-bottom: 16px;
}

.online-body,
.lk-body {
  padding: 12px 16px;
  color: #666;
}

.role-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.role-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
}

#ft {
  padding: 16px 4px 6px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #777;
}

#scrolltop {
  position: fixed;
  right: 18px;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
}

#scrolltop a,
#scrolltop button {
  width: 42px;
  height: 42px;
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

#scrolltop a:hover,
#scrolltop button:hover {
  border-color: #fc5679;
  color: #fc5679;
}

/* 原生模态弹窗（遵循 modern-web-guidance dialog & validate-input-after-interaction 规范） */
dialog.bbs-dialog {
  border: 0;
  border-radius: 10px;
  padding: 0;
  width: min(560px, 92vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

dialog.bbs-dialog:modal {
  overscroll-behavior: contain;
}

dialog.bbs-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dlg-header {
  padding: 14px 18px;
  background: #fc5679;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dlg-header h1 {
  margin: 0;
  font-size: 16px;
}

.dlg-close {
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.dlg-body {
  padding: 18px;
}

.dlg-field {
  margin-bottom: 12px;
}

.dlg-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.dlg-field input,
.dlg-field select,
.dlg-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
}

.dlg-field :is(:user-invalid, .user-invalid-fallback) {
  border-color: #dc2626;
  background: #fef2f2;
}

.dlg-error {
  display: none;
  color: #dc2626;
  font-size: 12px;
  margin-top: 3px;
}

.dlg-field :is(:user-invalid, .user-invalid-fallback) + .dlg-error {
  display: block;
}

.msg-banner {
  padding: 9px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  display: none;
}

.msg-banner.show { display: block; }
.msg-banner.ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.msg-banner.err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
