/* ============================================================
 * 轻型论坛 · 前端新框架 —— 补充/模块样式
 * 覆盖 JS 动态模板类与首页遗留模块（彩图/生肖表等）
 * ============================================================ */

/* ---------- 按钮变体 ---------- */
.btn-primary { background: var(--primary-grad); color: #fff; }

/* ---------- 开奖记录页（kj_list.js 动态） ---------- */
.kj-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.kj-tab {
  display: inline-block; padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 14px; font-weight: 700;
}
.kj-tab.on { background: var(--primary-grad); border-color: transparent; color: #fff; box-shadow: 0 3px 10px rgba(255, 95, 0, .28); }
.kj-year {
  display: inline-block; padding: 5px 13px; border-radius: 8px;
  background: #f1ece4; color: var(--muted); font-size: 13px; font-weight: 600;
}
.kj-year.on { background: var(--dark); color: var(--gold); }

.kjls-empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 14px; }
.kjls-pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 16px 0 4px; }
.kjls-pager a, .kjls-pager span {
  min-width: 34px; height: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 14px; color: var(--text);
  background: #fff; border: 1px solid var(--line);
}
.kjls-pager a:hover { border-color: var(--primary); color: var(--primary); }
.kjls-pager .is-cur { background: var(--primary-grad); color: #fff; border-color: transparent; font-weight: 700; }

/* ---------- 开奖组件（kj_widget.html） ---------- */
.kj-widget-root { background: var(--dark); border-radius: 14px; overflow: hidden; }
.kj-widget-block { padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.kj-widget-block:last-child { border-bottom: 0; }
.kj-widget-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: rgba(255, 233, 214, .85); }
.kj-widget-name { font-weight: 800; color: #fff; }
.kj-widget-issue { color: var(--gold); font-weight: 700; }
.kj-widget-cd { margin-left: auto; font-family: Tahoma, Geneva, sans-serif; font-weight: 900; font-size: 15px; color: var(--gold-light); letter-spacing: 1px; }
.kj-widget-balls { display: flex; gap: 6px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.kj-widget-ball {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .25);
}
.kj-widget-ball.b-red { background: linear-gradient(135deg, #ff5f5f, #d82f2f); }
.kj-widget-ball.b-blue { background: linear-gradient(135deg, #4a7dff, #2456c9); }
.kj-widget-ball.b-green { background: linear-gradient(135deg, #3ecf6e, #1f9e4c); }
.kj-widget-plus { font-size: 20px; color: var(--gold); font-weight: 800; margin: 0 2px; }
.kj-widget-foot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(255, 233, 214, .8); }
.kj-widget-foot b { color: var(--gold); }
.kj-widget-foot a { margin-left: auto; color: var(--gold); font-weight: 700; }

/* ---------- 开奖条（kj_strip.html） ---------- */
.kj-strip-root { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; background: linear-gradient(90deg, #17100b, #2a1206); color: rgba(255, 233, 214, .9); font-size: 13px; overflow: hidden; white-space: nowrap; }
.kj-strip-title { color: var(--gold); font-weight: 800; }
.kj-strip-items { display: inline-flex; gap: 22px; align-items: center; overflow: hidden; flex: 1; }
.kj-strip-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.kj-strip-ball { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; }
.kj-strip-ball.ball-1, .kj-strip-ball.ball-2, .kj-strip-ball.ball-3,
.kj-strip-ball.ball-4, .kj-strip-ball.ball-5, .kj-strip-ball.ball-6,
.kj-strip-ball.ball-7 { background: linear-gradient(135deg, #ff5f5f, #d82f2f); }
.kj-strip-more { flex: none; color: var(--gold); font-weight: 700; font-size: 12.5px; }

/* ---------- 客服消息（service.js 动态） ---------- */
.chat-msg { display: flex; gap: 8px; max-width: 86%; }
.chat-msg .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-grad); color: #fff; font-size: 13px; font-weight: 800;
}
.chat-msg .msg-main { min-width: 0; }
.chat-msg .msg-name { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.chat-msg .msg-bubble {
  padding: 10px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.65;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); word-break: break-word;
}
.chat-msg .msg-time { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.chat-msg.is-me { flex-direction: row-reverse; }
.chat-msg.is-me .msg-main { text-align: right; }
.chat-msg.is-me .msg-bubble { background: var(--primary-grad); color: #fff; border: 0; border-bottom-right-radius: 4px; }
.chat-msg.is-me .msg-time { text-align: right; }
.chat-msg.is-me .avatar { background: var(--dark); }
.chat-msg.is-admin .msg-bubble { border-bottom-left-radius: 4px; }

.service-head { display: flex; align-items: center; justify-content: space-between; }
.service-info h1 { font-size: 18px; color: var(--dark); }
.sound-toggle { border-radius: 14px; padding: 4px 12px; font-size: 12px; border: 1px solid rgba(245, 185, 66, .5); background: rgba(255, 255, 255, .15); color: var(--gold-light); }
.img-preview { position: relative; }
.img-preview img { border-radius: 8px; border: 1px solid var(--line); }
.img-upload-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px dashed #d8c9b2; border-radius: 10px; background: #fdf8f0; color: var(--muted); font-size: 14px; cursor: pointer; }

/* ---------- 首页帖子列表（home.js / ui.js 动态） ---------- */
.post-plate {
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 6px;
  color: #fff; background: linear-gradient(135deg, #2a1c0d, #5a3a12);
}
.post-plate-sell { background: var(--primary-grad); }
.post-plate-idle { background: #efe9df; color: var(--muted); }
.post-end-gif {
  display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px;
  background: var(--primary-grad); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .5px;
  vertical-align: 1px; animation: postNewPulse 1.6s ease-in-out infinite;
}
@keyframes postNewPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.am-issue { color: var(--primary-deep); font-weight: 800; }

/* ---------- 列表页（list.js 动态） ---------- */
.item-body { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.item-body:last-child { border-bottom: 0; }
.item-body .title { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-body .title:hover { color: var(--primary); }
.item-body .price { flex: none; color: var(--primary); font-weight: 800; font-size: 14px; }

/* ---------- 已购（user-purchases.js 动态） ---------- */
.purchase-title-link { color: var(--text); font-weight: 700; }
.purchase-title-link:hover { color: var(--primary); }

/* ---------- 首页彩图模块（amct） ---------- */
.amct-fragment { margin-top: 14px; }
.img10js2045Main { margin-top: 12px; }
.img10js2045MainItem { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.img10js2045ImgItem {
  background: #fff8ef; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 6px; text-align: center; font-size: 13px; color: var(--text);
  cursor: pointer; transition: box-shadow .2s, transform .1s;
}
.img10js2045ImgItem:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--primary); }
.img10js2045ImgItem::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 6px; border-radius: 8px; background: var(--primary-grad); }
.img10js2045ImgItem div:first-child { font-weight: 700; }

/* ---------- 首页生肖表（footer-fragment） ---------- */
.footer-fragment { margin-top: 14px; }
.gongshi { width: 100%; border-collapse: collapse; margin-top: 12px; }
.gongshi td { padding: 0; }
.gongshi th { background: #fdf3e7; color: #7a3d0a; padding: 10px; }
.sx { padding: 10px; }
.sx th { text-align: center; }
.sx1 { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
.sx1 li {
  width: calc(25% - 8px); background: #fdfaf4; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px;
}
.sx1 dl { margin: 0; }
.sx1 dt { font-weight: 800; color: var(--dark); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.sx1 dt img { width: 20px; height: 20px; }
.sx1 dd { margin: 8px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.sx1 dd span { min-width: 28px; text-align: center; padding: 3px 6px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.sx1 dd .red { background: #ffe3e3; color: #c1272d; }
.sx1 dd .blue { background: #e3ecff; color: #2456c9; }
.sx1 dd .green { background: #e2f6e8; color: #1f8a3d; }
.clearfix::after { content: ""; display: table; clear: both; }

@media (max-width: 640px) {
  .sx1 li { width: calc(50% - 5px); }
}

/* ---------- 其他残留 ---------- */
.author-head { margin-bottom: 12px; }
.bbs-top-wrap { margin-top: 12px; }
.kj-top-banner { margin-bottom: 12px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery-item { display: block; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.gallery-item img { display: block; width: 100%; height: 150px; object-fit: cover; }
.gallery-item:hover { box-shadow: var(--shadow); }

/* 底部导航文字 */
.bn-label { display: block; line-height: 1; }

/* 首页登录条图标（纯 CSS 图标） */
.hl-ico-user::before {
  content: ""; display: block; width: 9px; height: 9px; border-radius: 50%;
  border: 1.6px solid var(--gold-light); margin: 0 auto 3px;
}
.hl-ico-user::after {
  content: ""; display: block; width: 16px; height: 8px; border-radius: 8px 8px 0 0;
  border: 1.6px solid var(--gold-light);
}
.hl-ico-pass::before {
  content: ""; display: block; width: 14px; height: 12px; border-radius: 3px;
  border: 1.6px solid var(--gold-light); position: relative; top: 4px;
}
.hl-ico-pass::after {
  content: ""; display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-light); position: relative; bottom: 2px; margin: 0 auto;
}

/* 首页公告空状态 */
.home-urgent-block { color: var(--muted); text-align: center; padding: 14px 0; font-size: 14px; }
