/* ====== 海安网模板样式 ====== */

/* --- 全局 --- */
body {
  margin: 0;
  padding: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
}
a { color: #333; text-decoration: none; }
a:hover { color: #d32f2f; }

/* --- 顶部工具栏 --- */
.haian-topbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  font-size: 12px;
  color: #666;
}
.haian-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.haian-topbar-left span { margin-right: 8px; }
.haian-topbar-sep { color: #ccc; }
.haian-topbar-right { display: flex; align-items: center; gap: 12px; }
.haian-login-btn {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  color: #fff;
}
.haian-login-wechat { background: #07c160; }
.haian-login-sms { background: #1890ff; }
.haian-topbar-link { color: #666; font-size: 12px; }
.haian-topbar-link:hover { color: #d32f2f; }

/* --- 头部 Logo 区 --- */
.haian-header {
  background: #fff;
  padding: 15px 0;
}
.haian-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.haian-logo-img { height: 50px; }
.haian-header-actions { display: flex; gap: 12px; }
.haian-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #666;
  background: #fff;
  cursor: pointer;
}
.haian-btn:hover { border-color: #d32f2f; color: #d32f2f; }
.haian-btn-publish { border-color: #d32f2f; color: #d32f2f; }
.haian-btn-publish:hover { background: #d32f2f; color: #fff; }

/* --- 主导航 --- */
.haian-nav {
  background: #3c3c3c;
}
.haian-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.haian-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}
.haian-nav-list li a {
  display: block;
  padding: 12px 24px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}
.haian-nav-list li a:hover { background: #555; }
.haian-nav-list li.active a {
  background: #d32f2f;
  color: #fff;
}

/* --- 容器 --- */
.haian-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
}

/* --- 面包屑 --- */
.haian-breadcrumb {
  background: #f0f0f0;
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
}
.haian-breadcrumb a { color: #666; }
.haian-breadcrumb a:hover { color: #d32f2f; }
.haian-breadcrumb-sep { margin: 0 6px; color: #999; }
.haian-breadcrumb-home { font-size: 14px; }

/* --- 两栏布局 --- */
.haian-main-layout {
  display: flex;
  gap: 20px;
}
.haian-main { flex: 1; min-width: 0; }
.haian-sidebar { width: 300px; flex-shrink: 0; }

/* --- 帖子工具栏 --- */
.haian-thread-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.haian-btn-post {
  display: inline-block;
  padding: 8px 20px;
  background: #d32f2f;
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
}
.haian-btn-post:hover { background: #b71c1c; color: #fff; }
.haian-btn-post-sm {
  display: inline-block;
  padding: 6px 14px;
  background: #d32f2f;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
}
.haian-btn-post-sm:hover { background: #b71c1c; color: #fff; }

/* --- 分页（linghuijin 风格） --- */
.haian-pg {
  padding: 20px 0;
  width: 100%;
  text-align: center;
  clear: both;
  margin: 48px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.haian-pg a, .haian-pg span {
  color: #666;
  padding: 0 15px;
  display: inline-block;
  vertical-align: middle;
  line-height: 34px;
  background: #f9f9f9;
  border: 1px solid #f2f2f2;
  text-decoration: none;
}
.haian-pg a:hover {
  color: #fff;
  background: #d32f2f;
  border-color: #d32f2f;
  box-shadow: 0 0 14px rgba(0,0,0,.2);
  text-decoration: none;
}
.haian-pg strong {
  display: inline-block;
  color: #fff;
  background: #d32f2f;
  border-color: #d32f2f;
  box-shadow: 0 0 14px rgba(0,0,0,.2);
  padding: 0 15px;
  line-height: 34px;
}
.haian-pg .nxt { border-color: #d32f2f; color: #d32f2f; }

/* --- 帖子卡片（linghuijin 风格） --- */
#banners { margin-top: 0; }
.feed_tegao {
  position: relative;
  height: 125px;
  border-bottom: 1px solid #ebebeb;
  padding: 15px 15px 20px 195px;
}
.feed_tegao .picture {
  position: absolute;
  left: 15px;
  top: 20px;
  width: 160px;
  height: 120px;
}
.feed_tegao .picture a { display: block; height: 100%; }
.feed_tegao .picture img { width: 100%; height: 100%; object-fit: cover; }
.feed_tegao h4 { padding-bottom: 6px; margin: 0; }
.feed_tegao h4 a {
  text-decoration: none;
  word-wrap: break-word;
  word-break: break-all;
  color: #000;
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.feed_tegao h4 a:hover { color: #d32f2f; }
.feed_tegao .summary {
  font-size: 14px;
  line-height: 24px;
  color: #777;
  height: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 0;
}
.feed_tegao .more { color: #369; text-decoration: none; margin-left: 4px; }
.feed_tegao a.more:hover { text-decoration: underline; }
.feed_tegao .infos {
  position: absolute;
  bottom: 19px;
  font-size: 14px;
  color: #999;
  width: 450px;
}
.feed_tegao .infos .time {
  display: inline-block;
  vertical-align: top;
  line-height: 21px;
  height: 21px;
}
#banners .long .summary { height: 72px; }

/* ====== 详情页 ====== */

/* --- 文章标题区 --- */
.haian-article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.haian-article-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
  flex: 1;
}
.haian-article-actions { flex-shrink: 0; margin-left: 15px; }
.haian-article-action {
  font-size: 13px;
  color: #999;
  border: 1px solid #ddd;
  padding: 4px 10px;
  border-radius: 3px;
}
.haian-article-action:hover { color: #d32f2f; border-color: #d32f2f; }

/* --- 文章元信息 --- */
.haian-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.haian-article-floor {
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
}
.haian-article-only { color: #666; }

/* --- 文章正文 --- */
.haian-article-summary {
  background: #f9f9f9;
  border-left: 3px solid #d32f2f;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}
.haian-article-body {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}
.haian-article-body img {
  max-width: 100%;
  height: auto;
}
.haian-article-body p { margin: 0 0 16px 0; }

/* --- 互动按钮 --- */
.haian-article-interact {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid #eee;
  margin-top: 20px;
}
.haian-interact-btn {
  font-size: 14px;
  color: #666;
  padding: 6px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.haian-interact-btn:hover { color: #d32f2f; border-color: #d32f2f; }

/* --- 回复区 --- */
.haian-reply-section { margin-top: 20px; }
.haian-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.haian-reply-back { font-size: 13px; color: #666; }
.haian-reply-back:hover { color: #d32f2f; }
.haian-reply-editor {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  padding: 15px;
}
.haian-reply-toolbar {
  display: flex;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
  font-size: 13px;
  color: #666;
}
.haian-reply-toolbar span { cursor: pointer; }
.haian-reply-toolbar span:hover { color: #d32f2f; }
.haian-reply-login-hint {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-size: 13px;
}
.haian-reply-login-hint a { color: #1890ff; }
.haian-reply-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.haian-btn-reply {
  padding: 8px 24px;
  background: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}
.haian-btn-reply:hover { background: #b71c1c; }
.haian-reply-actions label { font-size: 13px; color: #666; }

/* ====== 侧边栏 ====== */
.haian-sidebar-box {
  background: #fff;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.haian-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #d32f2f;
}

/* --- 排序按钮 --- */
.haian-sort-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.haian-sort-btn {
  display: block;
  text-align: center;
  padding: 6px 4px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 12px;
  color: #666;
}
.haian-sort-btn:hover { border-color: #d32f2f; color: #d32f2f; }
.haian-sort-btn.active {
  background: #d32f2f;
  color: #fff;
  border-color: #d32f2f;
}

/* --- 推荐列表 --- */
.haian-recommend-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.haian-recommend-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.haian-recommend-list li:last-child { border-bottom: none; }
.haian-recommend-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  overflow: hidden;
  border-radius: 3px;
}
.haian-recommend-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.haian-recommend-info { flex: 1; min-width: 0; }
.haian-recommend-title {
  display: block;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.haian-recommend-title:hover { color: #d32f2f; }
.haian-recommend-date {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* --- 热门排行 --- */
.haian-hot-rank {
  list-style: none;
  margin: 0;
  padding: 0;
}
.haian-hot-rank li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.haian-hot-rank li:last-child { border-bottom: none; }
.haian-rank-num {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f0f0;
  color: #999;
  flex-shrink: 0;
}
.haian-rank-top { background: #d32f2f; color: #fff; }
.haian-hot-rank li a {
  font-size: 13px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.haian-hot-rank li a:hover { color: #d32f2f; }

/* --- 作者卡片 --- */
.haian-author-card { text-align: center; }
.haian-author-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
}
.haian-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.haian-author-name { font-size: 15px; font-weight: 600; color: #1a1a1a; margin-bottom: 10px; }
.haian-author-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
}
.haian-author-stats span { text-align: center; }
.haian-author-actions { display: flex; gap: 8px; justify-content: center; }
.haian-author-btn {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 12px;
  color: #666;
}
.haian-author-btn:hover { border-color: #d32f2f; color: #d32f2f; }

/* --- 快捷标签 --- */
.haian-btn-back-list {
  display: block;
  text-align: center;
  padding: 10px;
  background: #d32f2f;
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 12px;
}
.haian-btn-back-list:hover { background: #b71c1c; color: #fff; }
.haian-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.haian-quick-tags a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #d32f2f;
  color: #d32f2f;
  border-radius: 3px;
  font-size: 12px;
}
.haian-quick-tags a:hover { background: #d32f2f; color: #fff; }

/* --- 联系信息 --- */
.haian-contact-info { font-size: 13px; color: #666; line-height: 2; }
.haian-contact-label { color: #999; }
.haian-contact-info a { color: #1890ff; }

/* ====== 页脚 ====== */
.haian-footer {
  background: #2c2c2c;
  color: #ccc;
  margin-top: 30px;
}
.haian-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 20px;
}
.haian-footer-top {
  display: flex;
  gap: 40px;
  padding-bottom: 25px;
  border-bottom: 1px solid #444;
}
.haian-footer-brand { flex: 1; min-width: 250px; }
.haian-footer-logo { height: 40px; margin-bottom: 12px; }
.haian-footer-desc { font-size: 13px; color: #999; line-height: 1.8; margin: 0; }
.haian-footer-links {
  display: flex;
  gap: 40px;
  flex: 2;
}
.haian-footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin: 0 0 12px 0;
}
.haian-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.haian-footer-col li { margin-bottom: 8px; }
.haian-footer-col a { color: #999; font-size: 13px; }
.haian-footer-col a:hover { color: #fff; }
.haian-footer-qrcode {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}
.haian-qrcode-item { text-align: center; }
.haian-qrcode-item img { width: 100px; height: 100px; border-radius: 4px; }
.haian-qrcode-item p { font-size: 12px; color: #999; margin: 6px 0 0; }

.haian-footer-bottom { padding-top: 20px; text-align: center; }
.haian-footer-bottom-links { margin-bottom: 10px; }
.haian-footer-bottom-links a { color: #999; font-size: 13px; }
.haian-footer-bottom-links a:hover { color: #fff; }
.haian-footer-bottom-links .pipe { color: #555; margin: 0 6px; }
.haian-footer-icp { font-size: 12px; color: #666; margin-bottom: 8px; }
.haian-footer-icp a { color: #666; }
.haian-footer-icp span { margin: 0 8px; }
.haian-footer-copy { font-size: 12px; color: #666; }
.haian-footer-copy strong { color: #999; }

/* ====== 浮动工具栏 ====== */
.haian-float-toolbar {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 999;
}
.haian-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: #666;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.haian-float-btn:hover { background: #d32f2f; color: #fff; border-color: #d32f2f; }
.haian-float-top { margin-top: 4px; }
