/* =========================================================
   szaima.com - 现代化增强样式（保守叠加，不破坏原模板）
   由 WorkBuddy 优化生成 2026-10-23
   ========================================================= */

/* 现代系统字体栈 + 更佳渲染 */
body, body * {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", "Source Han Sans SC", sans-serif;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: #f6f7f9;
}
a { transition: color .15s ease, opacity .15s ease; }

/* 内容卡片化：圆角 + 柔和阴影 */
.bm, .blk, .box_title {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  background: #fff;
}
.bm_h, .box_title {
  background: linear-gradient(180deg, #ffffff, #f7f8fa);
  border-bottom: 1px solid #eef0f3;
  border-radius: 8px 8px 0 0;
}
.bm_c { border-radius: 0 0 8px 8px; }

/* 链接 hover 反馈 */
.bm a:hover, .blk a:hover { opacity: .78; }

/* 按钮现代化 */
button, .pn, .btn, input[type="submit"] {
  border-radius: 6px !important;
  transition: all .15s ease;
}
button:hover, .pn:hover, input[type="submit"]:hover {
  filter: brightness(1.06);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* 输入框圆角 */
input[type="text"], input[type="password"], input[type="email"], textarea, select {
  border-radius: 6px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74,144,217,.15);
  outline: none;
}

/* 头部增强（已移除 sticky：comiis_header 为整块高区域，sticky 会导致内容穿透重叠） */
.comiis_header, #hd {
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* 图片圆角（头像与缩略图） */
.avatar img, .comiis_ipic img, .plc .avt img {
  border-radius: 6px;
}

/* 论坛主题列表行 hover */
.bm_c tr:hover td, .bm_c .threadlist li:hover {
  background: #fafbfc;
}

/* 平滑滚动 */
html { scroll-behavior: smooth; }

/* 图片资源懒加载兜底：防止破图闪烁 */
img { background: #f0f1f3; }

/* 响应式微调（大屏留白更舒适） */
@media (min-width: 1100px) {
  .wp { max-width: 1180px; margin: 0 auto; }
}

/* 移动端触控目标放大（配合注入的 viewport meta） */
@media (max-width: 768px) {
  .bm, .blk { border-radius: 6px; margin-left: 8px !important; margin-right: 8px !important; }
  button, .pn, .btn { min-height: 36px; }
}

/* =========================================================
   szaima.com - v3 增强（可读性 / 响应式 / 可访问性）
   由 WorkBuddy 优化生成 2026-10-23
   ========================================================= */

/* --- 正文可读性：行高与字号 --- */
.t_f, .t_f td, .pcb, .postcontent {
  line-height: 1.78;
  font-size: 15px;
}
.t_f img, .pcb img, .postcontent img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* --- 帖子内引用块 --- */
.t_f .quote, blockquote {
  border-left: 3px solid #c9d6e3 !important;
  background: #f7f9fb !important;
  border-radius: 0 6px 6px 0 !important;
  padding: 8px 12px !important;
  margin: 8px 0 !important;
}

/* --- 代码块 --- */
.t_f pre, .pcb pre {
  background: #f6f8fa;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

/* --- 版块/主题列表密度 --- */
.bm_c .threadlist li, .bm_c tr {
  transition: background .12s ease;
}

/* --- 链接可见性（可访问性：键盘焦点） --- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #3a6ea5 !important;
  outline-offset: 1px !important;
}

/* --- 文本选择色 --- */
::selection {
  background: #b3d4fc;
  color: #1a1a1a;
}

/* --- 广告位统一样式（不改变内容，仅容器观感） --- */
.myad img, .ad img { border-radius: 4px; }

/* --- 分页与按钮组 --- */
.pg a, .pgs .btn, .pn {
  transition: all .15s ease;
}
.pg strong, .pg a:hover {
  background: #3a6ea5 !important;
  color: #fff !important;
  border-color: #3a6ea5 !important;
}

/* --- 回顶按钮微调（配合 enhance.js） --- */
#sz-backtop:hover { background: #2c5a8a !important; }

/* --- 移动端内容区留白与字号 --- */
@media (max-width: 768px) {
  .t_f, .t_f td, .pcb { font-size: 15px; }
  .wp { padding-left: 10px; padding-right: 10px; }
  /* 移动端大图不溢出 */
  .t_f img { max-width: 100% !important; }
}

/* --- 宽屏阅读宽度上限（超宽屏不拉爆） --- */
@media (min-width: 1600px) {
  .wp { max-width: 1280px; }
}

/* --- 减少动画（尊重系统偏好，可访问性） --- */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* --- 打印优化 --- */
@media print {
  .myad, .ad, #sz-backtop, .comiis_header { display: none !important; }
}

/* =========================================================
   szaima.com - v3 增强（可读性 / 响应式 / 可访问性）
   由 WorkBuddy 优化生成 2026-10-23
   ========================================================= */

/* --- 正文可读性：行高与字号 --- */
.t_f, .t_f td, .pcb, .postcontent {
  line-height: 1.78;
  font-size: 15px;
}
.t_f img, .pcb img, .postcontent img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* --- 帖子内引用块 --- */
.t_f .quote, blockquote {
  border-left: 3px solid #c9d6e3 !important;
  background: #f7f9fb !important;
  border-radius: 0 6px 6px 0 !important;
  padding: 8px 12px !important;
  margin: 8px 0 !important;
}

/* --- 代码块 --- */
.t_f pre, .pcb pre {
  background: #f6f8fa;
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

/* --- 版块/主题列表密度 --- */
.bm_c .threadlist li, .bm_c tr {
  transition: background .12s ease;
}

/* --- 链接可见性（可访问性：键盘焦点） --- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #3a6ea5 !important;
  outline-offset: 1px !important;
}

/* --- 文本选择色 --- */
::selection {
  background: #b3d4fc;
  color: #1a1a1a;
}

/* --- 广告位统一样式（不改变内容，仅容器观感） --- */
.myad img, .ad img { border-radius: 4px; }

/* --- 分页与按钮组 --- */
.pg a, .pgs .btn, .pn {
  transition: all .15s ease;
}
.pg strong, .pg a:hover {
  background: #3a6ea5 !important;
  color: #fff !important;
  border-color: #3a6ea5 !important;
}

/* --- 回顶按钮微调（配合 enhance.js） --- */
#sz-backtop:hover { background: #2c5a8a !important; }

/* --- 移动端内容区留白与字号 --- */
@media (max-width: 768px) {
  .t_f, .t_f td, .pcb { font-size: 15px; }
  .wp { padding-left: 10px; padding-right: 10px; }
  /* 移动端大图不溢出 */
  .t_f img { max-width: 100% !important; }
}

/* --- 宽屏阅读宽度上限（超宽屏不拉爆） --- */
@media (min-width: 1600px) {
  .wp { max-width: 1280px; }
}

/* --- 减少动画（尊重系统偏好，可访问性） --- */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* --- 打印优化 --- */
@media print {
  .myad, .ad, #sz-backtop, .comiis_header { display: none !important; }
}
