/* zhuji 站点 - 公共布局：头部 / 导航 / 侧栏 / 页脚 / 登录弹窗 */

/* ---------------- 顶部 ---------------- */
.zj-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--zj-border);
  box-shadow: 0 1px 6px rgba(20, 40, 60, .04);
}

.zj-header-top {
  background: #f8fafc;
  border-bottom: 1px solid var(--zj-border);
  font-size: 12px;
  color: var(--zj-text-sub);
}

.zj-header-top .zj-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}

.zj-header-top .left,
.zj-header-top .right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.zj-header-top .left .hl {
  color: var(--zj-primary);
  cursor: pointer;
}

.zj-header-top a {
  cursor: pointer;
}

.zj-header-top a:hover {
  color: var(--zj-primary);
}

/* 已登录用户信息 */
.zj-header-top .zj-user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--zj-text);
  text-decoration: none;
}

.zj-header-top .zj-user-chip:hover {
  color: var(--zj-primary);
}

.zj-header-top .zj-user-chip b {
  font-weight: 600;
}

.zj-avatar.sm {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.zj-user-level {
  padding: 1px 6px;
  border-radius: 3px;
  background: #eef2f7;
  color: var(--zj-text-sub);
  font-size: 11px;
  font-style: normal;
}

.zj-user-level.is-vip {
  background: linear-gradient(135deg, #f5c451, #e8a33d);
  color: #fff;
}

.zj-header-main-wrap {
  background: #fff;
}

/* 主导航（含下拉子菜单） */
.zj-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.zj-nav-item {
  position: relative;
}

.zj-nav-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: var(--zj-radius-sm);
  font-size: 15px;
  white-space: nowrap;
  color: var(--zj-text);
}

.zj-nav-item > a .arr {
  font-size: 11px;
  color: var(--zj-text-muted);
  transition: transform .2s;
}

.zj-nav-item:hover > a {
  background: var(--zj-primary-light);
  color: var(--zj-primary);
}

.zj-nav-item:hover > a .arr {
  transform: rotate(180deg);
}

.zj-nav-item > a.active {
  color: var(--zj-primary);
  font-weight: 600;
  background: var(--zj-primary-light);
}

.zj-sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--zj-border);
  border-radius: var(--zj-radius-sm);
  box-shadow: var(--zj-shadow-hover);
  padding: 6px;
  display: none;
  z-index: 60;
}

.zj-nav-item:hover .zj-sub-menu {
  display: block;
}

.zj-sub-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--zj-text-sub);
  white-space: nowrap;
}

.zj-sub-menu a:hover {
  background: var(--zj-primary-light);
  color: var(--zj-primary);
}

.zj-header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.zj-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  background: #f4f7fa;
}

.zj-header-icon:hover {
  background: var(--zj-primary-light);
}

.zj-search-pop {
  position: absolute;
  right: 0;
  top: 44px;
  width: 300px;
  background: #fff;
  border: 1px solid var(--zj-border);
  border-radius: var(--zj-radius-sm);
  box-shadow: var(--zj-shadow-hover);
  padding: 12px;
  display: none;
  z-index: 70;
}

.zj-search-pop.show {
  display: block;
}

.zj-search-pop form {
  display: flex;
  gap: 8px;
}

.zj-search-pop input {
  flex: 1;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--zj-border);
  border-radius: var(--zj-radius-sm);
}

.zj-header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}

.zj-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.zj-logo .logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.zj-logo .mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--zj-primary), #3aa0d8);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zj-logo .txt b {
  display: block;
  font-size: 19px;
  letter-spacing: 1px;
}

.zj-logo .txt span {
  font-size: 12px;
  color: var(--zj-text-muted);
}

.zj-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3aa0d8, var(--zj-primary));
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.zj-avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.zj-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--zj-border);
  border-radius: var(--zj-radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
}

/* ---------------- 焦点图 ---------------- */
.zj-hero {
  max-width: var(--zj-container);
  margin: 20px auto 0;
  padding: 0 15px;
  display: flex;
  gap: 20px;
}

.zj-hero-slider {
  position: relative;
  flex: 1;
  height: 300px;
  border-radius: var(--zj-radius);
  overflow: hidden;
  box-shadow: var(--zj-shadow);
}

.zj-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s;
  background-size: cover;
  background-position: center;
}

.zj-hero-slide.active {
  opacity: 1;
}

.zj-hero-slide .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 24px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  color: #fff;
}

.zj-hero-slide .caption .cat {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--zj-accent);
  font-size: 12px;
}

.zj-hero-slide .caption h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.zj-hero-slide .caption p {
  margin: 0;
  font-size: 13px;
  opacity: .85;
}

.zj-hero-dots {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.zj-hero-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
}

.zj-hero-dots i.active {
  background: #fff;
  width: 18px;
  border-radius: 4px;
}

.zj-hero-side {
  width: 320px;
  flex-shrink: 0;
}

.zj-hot-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--zj-border);
}

.zj-hot-list li:last-child {
  border-bottom: none;
}

.zj-hot-list .rank {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #f1f4f8;
  color: var(--zj-text-sub);
  font-size: 12px;
  text-align: center;
  line-height: 20px;
  flex-shrink: 0;
}

.zj-hot-list li:nth-child(1) .rank {
  background: var(--zj-accent);
  color: #fff;
}

.zj-hot-list li:nth-child(2) .rank {
  background: #ff9c6e;
  color: #fff;
}

.zj-hot-list li:nth-child(3) .rank {
  background: #ffc069;
  color: #fff;
}

.zj-hot-list .t {
  font-size: 13px;
  line-height: 20px;
}

/* ---------------- 侧栏 ---------------- */
.zj-sidebar {
  width: 336px;
  flex-shrink: 0;
}

.zj-sidebar .zj-panel {
  padding: 16px 18px;
}

.zj-side-sticky {
  position: static;
}

.zj-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--zj-radius-sm);
  font-size: 14px;
}

.zj-cat-list li a:hover,
.zj-cat-list li a.active {
  background: var(--zj-primary-light);
  color: var(--zj-primary);
}

.zj-cat-list li span {
  font-size: 12px;
  color: var(--zj-text-muted);
}

.zj-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zj-tag-cloud a {
  padding: 4px 10px;
  border: 1px solid var(--zj-border);
  border-radius: 14px;
  font-size: 12px;
  color: var(--zj-text-sub);
}

.zj-tag-cloud a:hover {
  border-color: var(--zj-primary);
  color: var(--zj-primary);
  background: var(--zj-primary-light);
}

.zj-ad-box {
  display: block;
  height: 180px;
  border-radius: var(--zj-radius-sm);
  overflow: hidden;
  position: relative;
  color: #fff;
  padding: 18px;
  background: linear-gradient(135deg, #2b5876, #4e4376);
}

.zj-ad-box h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.zj-ad-box p {
  font-size: 12px;
  opacity: .85;
  margin: 0;
}

.zj-ad-box .flag {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 11px;
  opacity: .7;
}

.zj-side-post li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--zj-border);
}

.zj-side-post li:last-child {
  border-bottom: none;
}

.zj-side-post .thumb {
  width: 78px;
  height: 54px;
  border-radius: 6px;
  flex-shrink: 0;
  background: #eef2f7;
  background-size: cover;
  background-position: center;
}

.zj-side-post .info {
  min-width: 0;
}

.zj-side-post .info .t {
  font-size: 13px;
  line-height: 1.5;
}

.zj-side-post .info .m {
  font-size: 12px;
  color: var(--zj-text-muted);
  margin-top: 4px;
}

/* ---------------- 页脚 ---------------- */
/* 底部（对齐 kkce 主站 footer 样式） */
.zj-footer {
  background: #1F2535;
  color: #9aa3b2;
  margin-top: 40px;
  padding: 40px 0 0;
  font-size: 13px;
  clear: both;
  width: 100%;
  overflow: hidden;
}

.zj-footer-wrap {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* 友情链接 */
.zj-footer-friend {
  padding: 0 0 14px;
  font-size: 12px;
  color: #8a93a6;
  line-height: 28px;
}

.zj-footer-friend .friend-label {
  color: #c9cfdb;
  font-weight: 500;
  margin-right: 10px;
}

.zj-footer-friend a {
  font-size: 12px;
  color: #9aa3b2;
  margin-right: 14px;
  transition: color .15s;
}

.zj-footer-friend a:hover {
  color: #41A6FF;
}

/* 四栏导航 */
.zj-footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 26px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.zj-footer-col h5 {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 18px;
  padding-bottom: 10px;
}

.zj-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.zj-footer-col li {
  margin-bottom: 10px;
}

.zj-footer-col ul a {
  font-size: 13px;
  color: #9aa3b2;
  line-height: 1.6;
  transition: color .15s;
}

.zj-footer-col ul a:hover {
  color: #41A6FF;
}

/* 联系我们 */
.zj-footer-contact .contact-item {
  font-size: 13px;
  color: #9aa3b2;
  line-height: 1.8;
  margin-bottom: 8px;
}

.zj-footer-contact .contact-item b {
  color: #d7dbe4;
  font-weight: 500;
}

.zj-footer-qr {
  margin-top: 16px;
  text-align: center;
  display: inline-block;
}

.zj-footer-qr-box {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  margin-bottom: 6px;
  overflow: hidden;
}

.zj-footer-qr-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zj-footer-qr span {
  font-size: 12px;
  color: #8a93a6;
}

/* 底部协议栏 */
.zj-footer-bottom {
  padding: 22px 0;
  text-align: center;
  font-size: 12px;
  color: #8a93a6;
}

.zj-footer-copyright {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 28px;
}

.zj-footer-copyright span,
.zj-footer-bottom p {
  margin: 0;
  line-height: 1.6;
}

.zj-footer-bottom a {
  color: #8a93a6;
  transition: color .15s;
}

.zj-footer-bottom a:hover {
  color: #41A6FF;
}

@media (max-width: 768px) {
  .zj-footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

.zj-friend-links {
  max-width: var(--zj-container);
  margin: 0 auto;
  padding: 16px 15px 0;
}

.zj-friend-links .box {
  background: #fff;
  border: 1px solid var(--zj-border);
  border-radius: var(--zj-radius);
  padding: 14px 18px;
  box-shadow: var(--zj-shadow);
}

.zj-friend-links h5 {
  font-size: 14px;
  margin-bottom: 10px;
}

.zj-friend-links .links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.zj-friend-links .links a {
  font-size: 13px;
  color: var(--zj-text-sub);
}

/* ---------------- 登录弹窗 ---------------- */
.zj-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
}

.zj-modal-mask.show {
  display: flex;
}

.zj-modal {
  width: 380px;
  max-width: 92vw;
  background: #fff;
  border-radius: var(--zj-radius);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

.zj-modal .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.zj-modal .hd h4 {
  font-size: 17px;
}

.zj-modal .close {
  border: none;
  background: none;
  font-size: 20px;
  color: var(--zj-text-muted);
  cursor: pointer;
  line-height: 1;
}

.zj-modal .switch {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--zj-text-sub);
}

.zj-modal .switch a {
  color: var(--zj-primary);
  cursor: pointer;
}

.zj-modal .oauth {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.zj-modal .oauth button {
  flex: 1;
  height: 36px;
  border: 1px solid var(--zj-border);
  border-radius: var(--zj-radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--zj-text-sub);
}

.zj-modal .oauth button:hover {
  border-color: var(--zj-primary);
  color: var(--zj-primary);
}

/* ---------------- 回顶部 ---------------- */
.zj-backtop {
  position: fixed;
  right: 24px;
  bottom: 40px;
  z-index: 90;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--zj-border);
  box-shadow: var(--zj-shadow);
  color: var(--zj-text-sub);
  cursor: pointer;
  display: none;
  font-size: 16px;
}

.zj-backtop.show {
  display: block;
}

.zj-backtop:hover {
  color: var(--zj-primary);
  border-color: var(--zj-primary);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
  .zj-hero-side {
    display: none;
  }
}

@media (max-width: 992px) {
  .zj-sidebar {
    width: 100%;
  }

  .zj-header-top .right {
    display: none;
  }

  .zj-header-main {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 12px;
  }

  .zj-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

  .zj-sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding-left: 12px;
  }

  .zj-nav-item:hover .zj-sub-menu,
  .zj-nav-item:focus-within .zj-sub-menu {
    display: block;
  }
}

@media (max-width: 640px) {
  .zj-header-top .left a:nth-child(n+2) {
    display: none;
  }

  .zj-header-icon:last-child {
    display: none;
  }
}
