/* zbp.css v1.0.0 · 智博酷风资源社区排版 */
:root {
  --zb-primary: #3d7eff;
  --zb-primary-dark: #2b66e6;
  --zb-primary-soft: #eaf2ff;
  --zb-accent: #14c4d4;
  --zb-pin: #ff6b4a;
  --zb-bg: #f3f5f8;
  --zb-white: #ffffff;
  --zb-text: #222833;
  --zb-muted: #8b93a7;
  --zb-border: #e6eaf0;
  --zb-footer: #1b2230;
  --zb-shadow: 0 8px 28px rgba(28, 41, 70, 0.06);
  --zb-shadow-lg: 0 16px 40px rgba(28, 41, 70, 0.12);
  --zb-radius: 12px;
  --zb-radius-sm: 8px;
  --zb-header-h: 64px;
  --zb-container: 1280px;
  --zb-ease: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.zb-page {
  margin: 0;
  min-width: 320px;
  background: var(--zb-bg);
  color: var(--zb-text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--zb-ease);
}

a:hover {
  color: var(--zb-primary);
}

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

h1, h2, h3, h4, h5, p {
  margin: 0;
}

button,
input {
  font-family: inherit;
}

.zb-container {
  width: 100%;
  max-width: var(--zb-container);
  margin: 0 auto;
  padding: 0 20px;
}

.zb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 26, 40, 0.45);
}

.zb-overlay.is-open {
  display: block;
}

/* Header */
.zb-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--zb-header-h);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--zb-border);
  backdrop-filter: blur(12px);
  transition: box-shadow var(--zb-ease);
}

.zb-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(28, 41, 70, 0.08);
}

.zb-header__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--zb-header-h);
}

.zb-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.zb-logo img {
  display: block;
  max-height: 40px;
  width: auto;
}

.zb-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.zb-nav__link {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--zb-text);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.zb-nav__link:hover,
.zb-nav__link.on,
.zb-nav__link.active {
  color: var(--zb-primary);
  background: var(--zb-primary-soft);
}

.zb-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.zb-search {
  display: flex;
  align-items: center;
  width: 210px;
  height: 38px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--zb-border);
  border-radius: 50px;
  background: #f7f8fb;
}

.zb-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--zb-text);
  font-size: 13px;
}

.zb-search button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--zb-primary);
  color: #fff;
  cursor: pointer;
}

.zb-login {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--zb-muted);
}

.zb-login a {
  padding: 6px 8px;
}

.zb-useravatar,
.useravatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.zb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 50px;
  background: var(--zb-primary);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--zb-ease), transform var(--zb-ease);
}

.zb-btn:hover {
  background: var(--zb-primary-dark);
  transform: translateY(-1px);
}

.zb-btn--ghost {
  background: var(--zb-primary-soft);
  color: var(--zb-primary) !important;
}

.zb-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--zb-text);
  font-size: 20px;
  cursor: pointer;
}

/* Showcase */
.zb-showcase {
  position: relative;
  padding: 24px 0 8px;
}

.zb-showcase > .zb-container {
  position: relative;
}

.zb-showcase__viewport {
  overflow: hidden;
}

.zb-showcase__track {
  display: flex;
  gap: 16px;
  transition: transform 0.45s ease;
}

.zb-showcard {
  flex: 0 0 calc((100% - 32px) / 3);
  overflow: hidden;
  border-radius: var(--zb-radius);
  background: var(--zb-white);
  box-shadow: var(--zb-shadow);
}

.zb-showcard__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dce3ee;
}

.zb-showcard__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.zb-showcard:hover .zb-showcard__cover img {
  transform: scale(1.06);
}

.zb-showcard__body {
  padding: 14px 16px 16px;
}

.zb-showcard__body h3 {
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.zb-showcard__body p {
  color: var(--zb-muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zb-showcard__body p:empty,
.zb-showcard__body h3:empty {
  display: none;
}

.zb-showcase__ctrl {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--zb-shadow);
  color: var(--zb-text);
  cursor: pointer;
}

.zb-showcase__ctrl--prev { left: 4px; }
.zb-showcase__ctrl--next { right: 4px; }

/* Tabs */
.zb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.zb-tabs a {
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--zb-white);
  color: var(--zb-muted);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 0 rgba(28, 41, 70, 0.03);
}

.zb-tabs a:hover,
.zb-tabs a.is-active,
.zb-tabs a.on,
.zb-tabs a.active {
  background: var(--zb-primary);
  color: #fff;
}

/* Layout */
.zb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
  padding-bottom: 48px;
}

.zb-feed,
.zb-content,
.zb-side {
  min-width: 0;
}

.zb-side {
  position: sticky;
  top: 84px;
}

/* Cards */
.zb-card {
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--zb-radius);
  background: var(--zb-white);
  box-shadow: var(--zb-shadow);
}

.zb-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
}

.zb-card__title {
  position: relative;
  padding-left: 12px;
  font-size: 16px;
  font-weight: 700;
}

.zb-card__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: var(--zb-primary);
}

.zb-card__more {
  color: var(--zb-muted);
  font-size: 13px;
}

/* Pinned / list item */
.zb-post {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--zb-border);
  transition: background var(--zb-ease);
}

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

.zb-post:hover {
  background: #fafbff;
}

.zb-post--pin {
  background: linear-gradient(180deg, #f7faff 0%, #fff 70%);
}

.zb-post__cover {
  position: relative;
  display: block;
  overflow: hidden;
  height: 148px;
  border-radius: var(--zb-radius-sm);
  background: #dce3ee;
}

.zb-post__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.zb-post:hover .zb-post__cover img {
  transform: scale(1.05);
}

.zb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--zb-pin);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.zb-post__title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.zb-post__excerpt {
  margin-bottom: 12px;
  color: var(--zb-muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--zb-muted);
  font-size: 12px;
}

.zb-meta a {
  color: var(--zb-primary);
}

.zb-meta i {
  margin-right: 4px;
}

/* Visual grid */
.zb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.zb-vcard {
  overflow: hidden;
  border-radius: var(--zb-radius-sm);
  background: #fff;
  transition: transform var(--zb-ease), box-shadow var(--zb-ease);
}

.zb-vcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--zb-shadow-lg);
}

.zb-vcard__cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #dce3ee;
}

.zb-vcard__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.zb-vcard:hover .zb-vcard__cover img {
  transform: scale(1.06);
}

.zb-vcard__body {
  padding: 12px 2px 4px;
}

.zb-vcard__body h3 {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar */
.zb-widget {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--zb-radius);
  background: var(--zb-white);
  box-shadow: var(--zb-shadow);
}

.zb-widget__title {
  position: relative;
  margin-bottom: 14px;
  padding-left: 12px;
  font-size: 16px;
  font-weight: 700;
}

.zb-widget__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: var(--zb-accent);
}

.zb-siteinfo {
  text-align: center;
}

.zb-siteinfo img {
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 4px var(--zb-primary-soft);
}

.zb-siteinfo h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.zb-siteinfo p {
  color: var(--zb-muted);
  font-size: 13px;
  line-height: 1.7;
}

.zb-siteinfo__meta {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--zb-border);
  color: var(--zb-muted);
  font-size: 13px;
  text-align: left;
}

.zb-sideitem {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.zb-sideitem:last-child {
  margin-bottom: 0;
}

.zb-sideitem__cover {
  display: block;
  overflow: hidden;
  height: 60px;
  border-radius: 6px;
  background: #dce3ee;
}

.zb-sideitem__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zb-sideitem h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zb-sideitem span {
  display: block;
  margin-top: 4px;
  color: var(--zb-muted);
  font-size: 12px;
}

.zb-rank {
  counter-reset: zb-rank;
}

.zb-rank li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  counter-increment: zb-rank;
}

.zb-rank li::before {
  content: counter(zb-rank);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #eef2f7;
  color: var(--zb-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.zb-rank li:nth-child(-n+3)::before {
  background: var(--zb-primary);
  color: #fff;
}

.zb-rank a {
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zb-links a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px dashed var(--zb-border);
  color: var(--zb-text);
  font-size: 14px;
}

.zb-links a:last-child {
  border-bottom: 0;
}

/* Inner page */
.zb-pagehead {
  margin: 20px 0 16px;
  padding: 22px 24px;
  border-radius: var(--zb-radius);
  background: var(--zb-white);
  box-shadow: var(--zb-shadow);
}

.zb-pagehead h1 {
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 800;
}

.zb-pagehead p,
.zb-crumb {
  color: var(--zb-muted);
  font-size: 13px;
}

.zb-crumb a {
  color: var(--zb-muted);
}

.zb-crumb a:hover {
  color: var(--zb-primary);
}

.zb-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 12px;
  color: var(--zb-muted);
  font-size: 13px;
}

/* Detail */
.zb-article {
  padding: 28px 32px 32px;
}

.zb-article__title {
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.35;
}

.zb-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--zb-border);
  color: var(--zb-muted);
  font-size: 13px;
}

.zb-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: var(--zb-radius-sm);
  background: var(--zb-primary-soft);
  color: #35507a;
  font-size: 14px;
}

.zb-contact a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 50px;
  background: var(--zb-primary);
  color: #fff !important;
  font-size: 13px;
}

.zb-article__body {
  font-size: 16px;
  line-height: 1.9;
  word-break: break-word;
}

.zb-article__body img {
  display: block;
  max-width: 100%;
  margin: 16px auto;
  border-radius: 8px;
}

.zb-article__body p {
  margin: 0 0 16px;
}

.zb-prenext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--zb-border);
}

.zb-prenext a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--zb-border);
  border-radius: var(--zb-radius-sm);
  color: var(--zb-text);
  font-size: 14px;
}

.zb-prenext a span {
  display: block;
  margin-bottom: 4px;
  color: var(--zb-muted);
  font-size: 12px;
}

.zb-prenext a.is-disabled {
  color: var(--zb-muted);
  cursor: default;
}

.zb-related {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 18px 18px;
}

.zb-single {
  padding: 28px 32px 36px;
  font-size: 16px;
  line-height: 1.9;
}

.zb-searchbox {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 18px;
}

.zb-searchbox input {
  flex: 1;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--zb-border);
  border-radius: 50px;
  outline: 0;
  font-size: 15px;
}

.zb-searchbox button {
  height: 46px;
  padding: 0 24px;
}

.zb-empty {
  padding: 48px 20px;
  color: var(--zb-muted);
  text-align: center;
}

.zb-form {
  padding: 8px 28px 32px;
}

.zb-form .form-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.zb-form label {
  width: 110px;
  padding-top: 10px;
  color: var(--zb-text);
  font-size: 14px;
}

.zb-form .col-sm-7,
.zb-form .col-sm-2 {
  flex: 1;
  min-width: 0;
}

.zb-form input[type="text"],
.zb-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--zb-border);
  border-radius: 8px;
  background: #fff;
  color: var(--zb-text);
  font-size: 14px;
  outline: none;
}

.zb-form input[type="submit"],
.zb-form .btn-primary {
  height: 42px;
  padding: 0 28px;
  border: 0;
  border-radius: 50px;
  background: var(--zb-primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.zb-form .red-star {
  color: #e5484d;
}

/* Pager */
.zb-pager,
.h-page {
  display: flex;
  justify-content: center;
  padding: 8px 0 18px;
}

.zb-pager ul,
.h-page ul,
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.zb-pager li,
.h-page li,
.pagination li {
  list-style: none;
}

.zb-pager a,
.zb-pager span,
.h-page a,
.h-page span,
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 50px;
  background: #eef2f7;
  color: var(--zb-text);
  font-size: 14px;
}

.zb-pager .active a,
.zb-pager .current,
.h-page .active a,
.h-page .current,
.pagination .active span,
.pagination .thisclass a {
  background: var(--zb-primary);
  color: #fff;
}

/* Footer */
.zb-footer {
  padding: 36px 0 24px;
  background: var(--zb-footer);
  color: rgba(255, 255, 255, 0.72);
}

.zb-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.zb-footer h4 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 15px;
}

.zb-footer a {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.zb-footer a:hover {
  color: #fff;
  transform: translateX(3px);
}

.zb-footer p {
  font-size: 14px;
  line-height: 1.8;
}

.zb-footer__copy {
  padding-top: 18px;
  font-size: 13px;
  text-align: center;
}

/* Float dock */
.zb-dock {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zb-dock a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--zb-shadow);
  color: var(--zb-text);
  font-size: 11px;
}

.zb-dock a i {
  margin-bottom: 2px;
  font-size: 16px;
  color: var(--zb-primary);
}

.zb-dock a:hover {
  background: var(--zb-primary);
  color: #fff;
}

.zb-dock a:hover i {
  color: #fff;
}

.zb-dock__top {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--zb-ease);
}

.zb-dock__top.is-show {
  opacity: 1;
  pointer-events: auto;
}

.zb-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.zb-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1120px) {
  .zb-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .zb-grid,
  .zb-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zb-showcard {
    flex-basis: calc((100% - 16px) / 2);
  }

  .zb-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .zb-search {
    display: none;
  }
}

@media (max-width: 768px) {
  .zb-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
  }

  .zb-header__bar {
    gap: 10px;
  }

  .zb-nav {
    display: none;
    position: absolute;
    top: var(--zb-header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: #fff;
    box-shadow: var(--zb-shadow);
  }

  .zb-nav.is-open {
    display: flex;
  }

  .zb-layout,
  .zb-prenext,
  .zb-footer__grid {
    grid-template-columns: 1fr;
  }

  .zb-side {
    order: 2;
    position: static;
  }

  .zb-showcard,
  .zb-post,
  .zb-grid,
  .zb-related {
    flex-basis: 100%;
    grid-template-columns: 1fr;
  }

  .zb-post__cover {
    height: 180px;
  }

  .zb-article,
  .zb-single {
    padding: 20px 16px 24px;
  }

  .zb-article__title {
    font-size: 22px;
  }

  .zb-header__actions .zb-login {
    display: none;
  }

  .zb-dock {
    right: 10px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .zb-pagehead h1 {
    font-size: 20px;
  }

  .zb-btn--submit {
    display: none;
  }
}
