body.zx-home-page {
  background: #f5f5f7;
}

body.zx-home-page .site-content,
body.zx-home-page #content {
  padding: 0;
}

.zx-home-shell {
  --zx-primary: #2563eb;
  --zx-primary-soft: rgba(37, 99, 235, 0.1);
  --zx-ink: #111827;
  --zx-muted: #6b7280;
  --zx-subtle: #f5f5f7;
  --zx-card: rgba(255, 255, 255, 0.82);
  --zx-border: rgba(17, 24, 39, 0.08);
  --zx-shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
  color: var(--zx-ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32rem),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%);
  min-height: 100vh;
  overflow: hidden;
}

.zx-home-topbar {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zx-home-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--zx-ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.zx-home-logo img {
  max-width: 150px;
  max-height: 42px;
  object-fit: contain;
}

.zx-home-logo span::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.08);
}

.zx-home-toplink {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--zx-border);
  color: var(--zx-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(16px);
}

.zx-hero {
  position: relative;
  padding: 70px 24px 120px;
}

.zx-hero::before,
.zx-hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.zx-hero::before {
  width: 420px;
  height: 420px;
  left: 50%;
  top: 54px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(37,99,235,0.08), transparent 70%);
}

.zx-hero::after {
  width: 260px;
  height: 260px;
  right: 12%;
  bottom: 40px;
  background: radial-gradient(circle, rgba(147,197,253,0.36), transparent 70%);
}

.zx-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  transition: padding-bottom 0.32s cubic-bezier(.2,.9,.2,1);
}

body.zx-course-filter-open .zx-hero-inner {
  padding-bottom: 96px;
}

.zx-hero-kicker {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--zx-border);
  color: var(--zx-primary);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.zx-hero-title {
  margin: 22px auto 14px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 850;
  color: var(--zx-ink);
}

.zx-hero-subtitle {
  max-width: 560px;
  margin: 0 auto 38px;
  color: var(--zx-muted);
  font-size: 18px;
  line-height: 1.8;
}

.zx-search-box {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.zx-search-types {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.zx-search-type-btn {
  border: 0;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.zx-search-type-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--zx-ink);
}

.zx-search-type-btn.active {
  background: var(--zx-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.zx-search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 8px 8px 8px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--zx-shadow);
  backdrop-filter: blur(22px);
}

.zx-search-icon {
  flex: 0 0 auto;
  color: #9ca3af;
}

.zx-search-input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--zx-ink);
  font-size: 16px;
  outline: none;
}

.zx-search-input::placeholder {
  color: #9ca3af;
}

.zx-search-filter-btn,
.zx-search-submit {
  border: 0;
  flex: 0 0 auto;
}

.zx-search-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
}

.zx-search-filter-btn.active,
.zx-search-filter-btn:hover {
  background: var(--zx-primary-soft);
  color: var(--zx-primary);
}

.zx-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zx-search-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.24);
}

.zx-search-dropdown {
  display: grid;
  position: absolute;
  z-index: 20;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  width: auto;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--zx-border);
  box-shadow: var(--zx-shadow);
  backdrop-filter: blur(20px);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.zx-search-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.zx-search-dropdown-item {
  border: 0;
  border-radius: 14px;
  padding: 11px 13px;
  background: transparent;
  color: #4b5563;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.zx-search-dropdown-item:hover,
.zx-search-dropdown-item.active {
  color: var(--zx-primary);
  background: var(--zx-primary-soft);
}

.zx-hot-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.zx-hot-tag {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--zx-border);
  text-decoration: none;
  font-size: 13px;
  backdrop-filter: blur(12px);
}

.zx-hot-tag:hover {
  color: var(--zx-primary);
  background: #fff;
}

.zx-nav-grid,
.zx-section {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.zx-nav-grid {
  margin-top: -78px;
  position: relative;
  z-index: 3;
}

.zx-nav-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.zx-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 172px;
  padding: 24px;
  border-radius: 30px;
  background: var(--zx-card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--zx-ink);
  text-decoration: none;
  text-align: center;
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(20px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.zx-nav-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.1);
}

.zx-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
  border-radius: 20px;
  color: #fff;
}

.zx-nav-icon.community { background: linear-gradient(135deg, #f97316, #fb7185); }
.zx-nav-icon.document { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.zx-nav-icon.shop { background: linear-gradient(135deg, #f59e0b, #facc15); color: #111827; }
.zx-nav-icon.user { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

.zx-nav-card strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.zx-nav-card small {
  color: var(--zx-muted);
  font-size: 13px;
}

.zx-section {
  padding-top: 76px;
}

.zx-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.zx-section-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 820;
  color: var(--zx-ink);
}

.zx-section-more {
  color: var(--zx-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.zx-course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.zx-course-card,
.zx-lottery-card,
.zx-community-topic {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.zx-course-card {
  display: block;
  overflow: hidden;
  border-radius: 28px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.zx-course-card:hover,
.zx-lottery-card:hover,
.zx-community-topic:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.1);
}

.zx-course-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: #e5e7eb;
}

.zx-course-body {
  padding: 20px;
}

.zx-course-category {
  color: var(--zx-primary);
  font-size: 12px;
  font-weight: 800;
}

.zx-course-title {
  margin: 8px 0 18px;
  color: var(--zx-ink);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 760;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zx-course-footer,
.zx-lottery-meta,
.zx-topic-meta,
.zx-topic-author {
  display: flex;
  align-items: center;
}

.zx-course-footer,
.zx-lottery-meta {
  justify-content: space-between;
  gap: 12px;
  color: var(--zx-muted);
  font-size: 13px;
}

.zx-course-author,
.zx-lottery-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.zx-course-avatar,
.zx-lottery-avatar,
.zx-topic-avatar {
  border-radius: 999px;
  object-fit: cover;
  background: #e5e7eb;
  flex: 0 0 auto;
}

.zx-course-avatar {
  width: 28px;
  height: 28px;
}

.zx-lottery-section {
  padding-top: 64px;
}

.zx-lottery-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  perspective: 1200px;
}

.zx-lottery-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(.2,.9,.2,1), box-shadow 0.25s ease;
}

.zx-lottery-card:hover {
  transform: translateY(-8px) rotateY(5deg);
}

.zx-lottery-card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.zx-lottery-thumb {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
}

.zx-lottery-body {
  padding: 15px;
}

.zx-lottery-card-title {
  margin: 0 0 12px;
  color: var(--zx-ink);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 750;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zx-lottery-avatar {
  width: 22px;
  height: 22px;
}

.zx-lottery-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--zx-border);
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-weight: 700;
  font-size: 13px;
}

.zx-lottery-refresh:hover {
  color: var(--zx-primary);
}

.zx-community-section {
  width: 100%;
  padding-top: 32px;
  padding-bottom: 48px;
  box-sizing: border-box;
}

.zx-community-section .zx-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.zx-community-section .zx-section-title {
  text-align: left;
}

.zx-community-waterfall {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.zx-community-list {
  width: 100%;
  columns: 4;
  column-gap: 14px;
}

.zx-community-topic {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 14px;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.zx-community-topic:nth-child(5n+1) {
  border-radius: 18px;
}

.zx-community-topic:nth-child(5n+2) .zx-topic-cover img {
  aspect-ratio: 3 / 4;
}

.zx-community-topic:nth-child(5n+3) .zx-topic-cover img {
  aspect-ratio: 1 / 1;
}

.zx-community-topic.no-image {
  min-height: 260px;
  background: #fff;
  backdrop-filter: none;
}

.zx-community-topic.is-sticky {
  border-color: rgba(37, 99, 235, 0.18);
}

.zx-community-topic-main {
  display: block;
  min-width: 0;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.zx-community-topic.no-image .zx-community-topic-main {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.zx-topic-emoji-field {
  position: relative;
  display: block;
  height: 108px;
  margin: -12px -12px 14px;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid rgba(17, 24, 39, 0.04);
}

.zx-topic-emoji-field::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), #fff 96%);
  pointer-events: none;
}

.zx-topic-emoji-field span {
  position: absolute;
  line-height: 1;
  opacity: 0.78;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.08));
}

.zx-topic-author {
  gap: 7px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.zx-topic-avatar {
  width: 24px;
  height: 24px;
}

.zx-topic-author-info {
  min-width: 0;
}

.zx-topic-author strong {
  display: block;
  color: var(--zx-ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zx-topic-author span,
.zx-topic-meta {
  color: var(--zx-muted);
  font-size: 11px;
}

.zx-topic-author span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zx-topic-title {
  margin: 0 0 6px;
  color: var(--zx-ink);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 750;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zx-community-topic.no-image .zx-topic-title {
  margin-bottom: 8px;
  font-size: 15px;
  text-align: left;
}

.zx-community-topic.no-image .zx-topic-text {
  text-align: left;
}

.zx-topic-text {
  margin: 0 0 10px;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zx-topic-meta {
  gap: 10px;
  padding-top: 2px;
}

.zx-topic-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e5e7eb;
}

.zx-topic-cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.zx-community-topic:hover .zx-topic-cover img {
  transform: scale(1.035);
}

.zx-topic-sticky {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.zx-topic-sticky-text {
  position: static;
  margin-bottom: 8px;
}

.zx-topic-image-count {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.zx-community-enter {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.zx-community-enter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zx-community-enter-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.22);
}

.zx-empty-hint {
  padding: 46px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--zx-border);
  color: var(--zx-muted);
  text-align: center;
}

@media screen and (max-width: 1024px) {
  .zx-nav-cards,
  .zx-course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zx-lottery-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zx-community-list {
    columns: 3;
  }
}

@media screen and (max-width: 720px) {
  .zx-topic-emoji-field {
    height: 92px;
  }

  .zx-home-topbar {
    padding: 18px 16px 0;
  }

  .zx-hero {
    padding: 54px 16px 92px;
  }

  .zx-hero-title {
    font-size: 42px;
  }

  .zx-hero-subtitle {
    font-size: 15px;
  }

  .zx-search-form {
    border-radius: 28px;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 14px;
  }

  .zx-search-icon {
    margin-top: 12px;
  }

  .zx-search-input {
    min-height: 44px;
  }

  .zx-search-filter-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .zx-search-submit {
    width: 46px;
    height: 44px;
  }

  .zx-search-dropdown {
    left: 0;
    right: 0;
    width: auto;
  }

  .zx-nav-grid {
    margin-top: -52px;
  }

  .zx-nav-grid,
  .zx-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .zx-nav-cards,
  .zx-course-grid,
  .zx-lottery-cards {
    grid-template-columns: 1fr;
  }

  .zx-nav-card {
    min-height: 142px;
  }

  .zx-section {
    padding-top: 54px;
  }

  .zx-section-title {
    font-size: 24px;
  }

  .zx-community-list {
    columns: 2;
    column-gap: 10px;
  }

  .zx-community-topic {
    margin-bottom: 10px;
    border-radius: 14px;
  }

  .zx-topic-text {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .zx-topic-cover img {
    max-height: 260px;
  }
}

/* 首页构建器 - 模块包裹层 */
.zx-builder-section {
  position: relative;
}

.zx-custom-html-section,
.zx-parent-template-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px;
}
