:root {
  --zb-bg: #f3f4f6;
  --zb-card-bg: #ffffff;
  --zb-card-border: #e5e7eb;
  --zb-text: #1f2937;
  --zb-muted: #6b7280;
  --zb-primary: #2563eb;
  --zb-primary-hover: #1d4ed8;
  --zb-radius: 6px;
  --zb-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  --zb-shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --zb-header-bg: rgba(255, 255, 255, 0.9);
  --zb-ani-fast: 0.28s;
  --zb-ani-base: 0.45s;
}

html[data-bs-theme="dark"] {
  --zb-bg: #0b1220;
  --zb-card-bg: #0f172a;
  --zb-card-border: rgba(148, 163, 184, 0.12);
  --zb-text: #e5e7eb;
  --zb-muted: #9ca3af;
  --zb-primary: #60a5fa;
  --zb-primary-hover: #3b82f6;
  --zb-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --zb-shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.35);
  --zb-header-bg: rgba(15, 23, 42, 0.9);
}

html, body {
  background: var(--zb-bg);
  color: var(--zb-text);
}

body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.6;
  font-size: 0.95rem;
}

@keyframes zbFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zbCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

a {
  color: var(--zb-primary);
  text-decoration: none;
}

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

.site-header {
  background: var(--zb-header-bg);
  backdrop-filter: saturate(180%) blur(8px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

html[data-bs-theme="dark"] .site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar {
  padding: 6px 0;
  gap: 1.2rem;
}

.sep {
  display: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li {
  margin: 0;
}

.nav-list a {
  color: var(--zb-text);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.15rem 0;
}

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

.actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.actions .action-btn {
  color: var(--zb-text);
  border-radius: 8px;
  padding: 0.18rem 0.32rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--zb-card-border);
}

.actions .action-btn:hover {
  color: var(--zb-primary);
  background: rgba(37, 99, 235, 0.08);
}

.login-btn {
  border-radius: 8px;
  padding: 0.32rem 0.8rem;
  background: var(--zb-primary);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.78rem;
}

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

.navbar-search {
  border-radius: 999px;
  border: 1px solid var(--zb-card-border);
  padding: 0.2rem 0.65rem;
  background: rgba(15, 23, 42, 0.04);
}

.card,
.post-item,
.home-widget,
.widget,
.sidebar .widget {
  background: var(--zb-card-bg);
  border-radius: var(--zb-radius);
  border: 1px solid var(--zb-card-border);
  box-shadow: var(--zb-shadow-sm);
}

.post-item {
  --zb-tilt-x: 0deg;
  --zb-tilt-y: 0deg;
  --zb-lift: 0px;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(920px) rotateX(var(--zb-tilt-x)) rotateY(var(--zb-tilt-y)) translateY(var(--zb-lift));
  transition: transform var(--zb-ani-fast) ease, box-shadow var(--zb-ani-fast) ease, border-color var(--zb-ani-fast) ease;
  animation: zbFadeUp 0.35s ease both;
  will-change: transform;
}

.post-item:hover {
  --zb-lift: -3px;
  box-shadow: var(--zb-shadow);
}

.post-item .entry-media,
.post-item .tips-badge {
  transform: translateZ(0);
  transition: transform var(--zb-ani-fast) ease, box-shadow var(--zb-ani-fast) ease;
  backface-visibility: hidden;
}

.post-item.zb-tilt-active:not(.item-list) .entry-media {
  transform: translateZ(14px);
}

.post-item.zb-tilt-active .tips-badge {
  transform: translateZ(20px);
}

.post-item .entry-wrapper {
  padding: 1.25rem 1.25rem 1.1rem;
}

.entry-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.entry-title a {
  color: var(--zb-text);
}

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

.item-list .entry-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.item-list .entry-footer {
  margin-top: 0.25rem;
}

.item-list .entry-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2 !important;
  overflow: hidden;
}

.entry-tags {
  margin-top: 0.18rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.entry-tags .tag {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.36rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--zb-card-border);
  color: var(--zb-muted);
  font-size: 0.7rem;
}

.entry-tags .tag:hover {
  color: var(--zb-primary);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
}

.entry-desc,
.entry-meta,
.article-meta,
.meta-date,
.meta-views,
.meta-likes,
.meta-fav {
  color: var(--zb-muted);
}

.entry-media .media-img {
  transition: transform 0.25s ease;
  will-change: transform;
}

.post-item:hover .entry-media .media-img {
  transform: scale(1.035);
}

.entry-media,
.entry-media .media-img,
.entry-media img {
  border-radius: var(--zb-radius);
  overflow: hidden;
}

.entry-media {
  aspect-ratio: 1 / 1;
  height: auto !important;
}

.entry-media.ratio {
  position: relative;
  width: 100%;
}

.entry-media.ratio::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 28%, rgba(255, 255, 255, 0.22) 50%, transparent 72%);
  transform: translateX(-130%);
  transition: transform 0.55s ease;
}

html[data-bs-theme="dark"] .entry-media.ratio::after {
  background: linear-gradient(120deg, transparent 28%, rgba(148, 163, 184, 0.18) 50%, transparent 72%);
}

.post-item:hover .entry-media.ratio::after {
  transform: translateX(130%);
}

.entry-media.ratio::before {
  content: "";
  display: block;
  padding-top: var(--zb-aspect-ratio, 100%) !important;
}

.entry-media.ratio.ratio-1x1 {
  --zb-aspect-ratio: 100%;
}

/* 强制所有 3:2 缩略图改为 1:1 */
.ratio-3x2 {
  --bs-aspect-ratio: 100% !important;
  --zb-aspect-ratio: 100% !important;
  aspect-ratio: 1 / 1 !important;
}

.entry-media.ratio > .media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.post-item.item-grid .entry-media,
.home .post-item .entry-media,
.archive .post-item .entry-media,
.category .post-item .entry-media {
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
}

.entry-media .media-img {
  height: 100%;
}

.posts-warp {
  row-gap: 0.75rem;
}

.home .posts-warp > .col,
.archive .posts-warp > .col,
.category .posts-warp > .col,
.search .posts-warp > .col,
.single .related-posts .row > .col {
  opacity: 0;
  animation: zbCardIn var(--zb-ani-base) cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.posts-warp > .col:nth-child(2),
.single .related-posts .row > .col:nth-child(2) {
  animation-delay: 0.05s;
}

.posts-warp > .col:nth-child(3),
.single .related-posts .row > .col:nth-child(3) {
  animation-delay: 0.1s;
}

.posts-warp > .col:nth-child(4),
.single .related-posts .row > .col:nth-child(4) {
  animation-delay: 0.15s;
}

.posts-warp > .col:nth-child(5),
.single .related-posts .row > .col:nth-child(5) {
  animation-delay: 0.2s;
}

.posts-warp > .col:nth-child(6),
.single .related-posts .row > .col:nth-child(6) {
  animation-delay: 0.25s;
}

.post-item.item-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--zb-card-border);
  border-radius: var(--zb-radius);
  background: var(--zb-card-bg);
  box-shadow: none;
}

.post-item.item-list:hover {
  box-shadow: none;
  border-color: #cbd5e1;
  --zb-lift: -1px;
}

.post-item.item-list .entry-media {
  flex: 0 0 130px;
  max-width: 130px;
  align-self: center;
}

.home .post-item.item-list .entry-media,
.single .post-item.item-list .entry-media {
  flex: 0 0 112px;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  aspect-ratio: 1 / 1;
}

.home .post-item.item-grid .entry-media,
.single .related-posts .post-item.item-grid .entry-media {
  width: min(86%, 192px);
  margin: 0.55rem auto 0.15rem;
  aspect-ratio: 1 / 1 !important;
}

.post-item.item-list .entry-media .media-img {
  border-radius: 12px;
}

.post-item.item-list .entry-wrapper {
  flex: 1 1 auto;
}

.post-item.item-list .entry-media {
  transition: transform var(--zb-ani-fast) ease, box-shadow var(--zb-ani-fast) ease;
}

.post-item.item-list:hover .entry-media {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.post-item.item-list.zb-tilt-active:hover .entry-media {
  transform: translateY(-1px) translateZ(14px);
}

.post-item.item-list .entry-title {
  font-size: 1.06rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.post-item.item-list .entry-desc {
  margin-top: 0.4rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--zb-muted);
  -webkit-line-clamp: 2 !important;
}

.post-item.item-list.zb-title-2line .entry-desc {
  -webkit-line-clamp: 1 !important;
}

.entry-cat-dot {
  font-size: 0.78rem;
  color: var(--zb-muted);
}

.entry-cat-dot a {
  color: var(--zb-muted);
}

.entry-cat-dot a + a::before {
  content: "/";
  margin: 0 0.4rem;
  color: rgba(107, 114, 128, 0.6);
}

.entry-cat-dot a:hover {
  color: var(--zb-primary);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.entry-meta i {
  color: rgba(37, 99, 235, 0.7);
}

.filter-warp {
  background: var(--zb-card-bg);
  border: 1px solid var(--zb-card-border);
  border-radius: var(--zb-radius);
  box-shadow: none;
  margin: 0.5rem auto;
  overflow: hidden;
}

.filter-warp .filter-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  margin: 0;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

html[data-bs-theme="dark"] .filter-warp .filter-item {
  border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
}

.filter-warp .filter-item:last-child {
  border-bottom: 0;
}

.filter-warp .filter-name {
  font-weight: 600;
  color: var(--zb-text);
  margin-right: 0.25rem;
  font-size: 0.8rem;
}

.filter-warp .filter-link a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--zb-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.filter-warp .filter-link a:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--zb-primary);
}

.filter-warp .filter-link.active a {
  background: rgba(37, 99, 235, 0.16);
  color: var(--zb-primary);
  font-weight: 600;
}

.archive-hero {
  position: relative;
  border-radius: var(--zb-radius);
  overflow: hidden;
  box-shadow: none;
  margin: 0.5rem auto;
}

.archive-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.35));
}

.archive-hero-bg {
  filter: saturate(110%) brightness(0.85);
}

.archive-hero .container {
  position: relative;
  z-index: 1;
}

.archive-title {
  color: #fff;
  font-weight: 700;
}

.archive-desc {
  color: rgba(255, 255, 255, 0.78);
}

.section-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.section-cat-navbtn {
  text-align: left;
}

.section-cat-navbtn .btn {
  border-radius: 8px;
  background: var(--zb-card-bg);
  border: 1px solid var(--zb-card-border);
  color: var(--zb-text);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
}

.section-cat-navbtn .btn.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--zb-primary);
}

.section-title {
  text-align: left;
  margin-bottom: 0.35rem;
}

.section-title h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title h3::before {
  content: "";
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: var(--zb-primary);
  display: inline-block;
}

.section-title p {
  color: var(--zb-muted);
  font-size: 0.8rem;
}

.page-nav .page-numbers,
.page-nav a.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  margin: 0 0.2rem;
  border-radius: 10px;
  background: var(--zb-card-bg);
  border: 1px solid var(--zb-card-border);
  color: var(--zb-text);
  box-shadow: var(--zb-shadow-sm);
}

.page-nav .page-numbers:hover {
  color: var(--zb-primary);
  border-color: rgba(37, 99, 235, 0.35);
}

.page-nav .current {
  background: var(--zb-primary);
  color: #fff;
  border-color: var(--zb-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.breadcrumb {
  background: var(--zb-card-bg);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--zb-card-border);
  box-shadow: var(--zb-shadow-sm);
}

.badge {
  border-radius: 999px;
  font-weight: 600;
}

.article-header {
  padding: 1.5rem 1.5rem 0;
}

.single .archive-shop {
  margin-top: 0.75rem !important;
  margin-bottom: 1rem !important;
}

.single .archive-shop .row {
  align-items: center;
  row-gap: 0.75rem;
}

.single .archive-shop .info-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.single .archive-shop .article-meta {
  margin-bottom: 0.45rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
}

.single .archive-shop .ri-down-warp {
  margin-top: 0.25rem !important;
}

.single .archive-shop .img-box {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.single .archive-shop .img-box img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.post-title {
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--zb-text);
}

.post-content {
  padding: 0 1.5rem 1.6rem;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--zb-text);
}

.post-content p {
  margin-bottom: 1.1rem;
}

.post-content h2,
.post-content h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--zb-text);
}

.post-content img,
.post-content video,
.post-content iframe,
.post-content .wp-block-image img {
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--zb-card-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--zb-card-bg);
}

.post-content table th,
.post-content table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--zb-card-border);
}

.post-content table tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.03);
}

.sidebar .widget,
.sidebar-wrapper .widget {
  padding: 1.1rem 1.25rem;
}

.uc-menu-warp {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
}

.uc-menu-warp li a {
  display: block;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  color: var(--zb-text);
}

.uc-menu-warp li a:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--zb-primary);
}

.uc-menu-warp .current-menu-item a {
  background: rgba(37, 99, 235, 0.14);
  color: var(--zb-primary);
  font-weight: 600;
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.55rem 1rem;
}

.btn-primary {
  background: var(--zb-primary);
  border-color: var(--zb-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--zb-primary-hover);
  border-color: var(--zb-primary-hover);
}

.btn-dark {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.form-control,
.form-select,
textarea {
  border-radius: 10px;
  border-color: var(--zb-card-border);
}

.form-label {
  font-weight: 600;
  color: var(--zb-text);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

@media (max-width: 991.98px) {
  .post-item .entry-wrapper {
    padding: 1rem 1rem 0.9rem;
  }

  .article-header,
  .post-content {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .single .archive-shop {
    margin-top: 0.55rem !important;
    margin-bottom: 0.8rem !important;
  }

  .single .archive-shop .img-box img {
    aspect-ratio: 16 / 10;
  }

  .post-item.item-list {
    flex-direction: column;
  }

  .post-item.item-list .entry-media {
    max-width: 100%;
  }

  .home .post-item.item-list .entry-media,
  .single .post-item.item-list .entry-media {
    width: min(42vw, 128px);
    min-width: min(42vw, 128px);
    max-width: min(42vw, 128px);
    margin-inline: auto;
  }
}
