/* ============================================
   Search Modal (mobile popup)
   ============================================ */
.search-box-content.modal-content {
  border-radius: var(--r-xl) !important;
  box-shadow: 0 25px 60px rgba(0,0,0,0.12) !important;
  margin: 0 auto !important;
  max-width: calc(100% - 32px) !important;
}

.search-box-content .search-title {
  color: var(--text-muted) !important;
}

.search-box-content .search-input {
  border-radius: var(--r-md) !important;
  border: 1.5px solid var(--border) !important;
  background: #F8FAFC !important;
  transition: border-color var(--t-fast) !important;
}

.search-box-content .search-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px var(--gold-bg-10) !important;
  outline: none !important;
}

.search-box-content .search-button button {
  background: var(--gold) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--r-md) !important;
  font-weight: 500 !important;
  transition: background var(--t-fast) !important;
  cursor: pointer;
}

.search-box-content .search-button button:hover {
  background: var(--gold-dark) !important;
}


/* ============================================
   Homepage Module Titles
   ============================================ */
.post-list .module-title {
  position: relative;
  display: inline-block;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 22px !important;
  color: var(--text-primary) !important;
  padding-bottom: 8px;
}

.post-list .module-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}

.post-modules-top {
  flex-direction: column !important;
  align-items: center !important;
  margin-bottom: 24px;
}

.modules-title-box {
  text-align: center !important;
  width: 100% !important;
}

.post-list-cats {
  margin-left: 0 !important;
  margin-top: 12px !important;
}

.post-list-cats a span {
  font-weight: 400 !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  border: none !important;
  font-size: 15px !important;
  padding: 2px 8px !important;
  border-radius: var(--r-sm) !important;
  transition: all var(--t-fast) !important;
}

.post-list-cats a:hover span,
.post-list-cats a.active span {
  color: var(--gold-dark) !important;
  background: var(--gold-bg) !important;
}

.post-list-cats a + a {
  margin-left: 16px;
}


/* ============================================
   Cards
   ============================================ */
.widget.box {
  background: var(--bg-card) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--border-light) !important;
  overflow: hidden;
  transition: box-shadow var(--t-base) !important;
  margin-bottom: 16px !important;
}

.b2_gap > li .item-in,
.post-list.box {
  background: var(--bg-card) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--border-light) !important;
  transition: box-shadow var(--t-base), transform var(--t-base) !important;
  overflow: hidden;
}

.b2_gap > li .item-in:hover,
.post-list.box:hover {
  box-shadow: var(--shadow-gold) !important;
  transform: translateY(-3px);
  cursor: pointer;
}

/* Thumbnail */
.post-module-thumb {
  border-radius: var(--r-md) !important;
  overflow: hidden !important;
}

.b2_gap > li .item-in .post-thumb,
.post-list.box .post-thumb {
  transition: transform var(--t-slow) !important;
}

.b2_gap > li .item-in:hover .post-thumb,
.post-list.box:hover .post-thumb {
  transform: scale(1.05);
}

/* Post title */
.post-info h2 {
  overflow: hidden;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  margin: 10px 0 8px !important;
}

.post-info h2 a,
.entry-title a {
  font-family: inherit !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  transition: color var(--t-fast) !important;
  line-height: 1.5 !important;
}

.post-info h2 a:hover,
.entry-title a:hover {
  color: var(--gold-dark) !important;
}

/* Post excerpt */
.home .post-info .post-excerpt {
  background-color: #F8FAFC;
  border-radius: var(--r-sm);
  padding: 8px 14px;
  color: var(--text-secondary) !important;
  font-size: 13px;
  line-height: 1.7;
  margin: 8px 0 0;
}

/* Post meta */
.post-list-meta {
  color: var(--text-muted) !important;
  font-size: 12px !important;
}

.list-footer {
  padding: 8px 0 0 !important;
  border-top: none !important;
}

/* Home row spacing */
.home_row {
  margin-bottom: 8px !important;
}

.home .b2_gap > li .item-in {
  padding: 20px !important;
}


/* ============================================
   Buttons
   ============================================ */
.wp-block-button__link,
.comment-form input[type="submit"] {
  border-radius: var(--r-md) !important;
  font-weight: 500 !important;
  transition: all var(--t-base) !important;
  cursor: pointer;
}

.comment-form input[type="submit"] {
  background: var(--gold) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px var(--gold-bg-25) !important;
}

.comment-form input[type="submit"]:hover {
  background: var(--gold-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--gold-bg-30) !important;
}

.wp-block-button__link {
  background: var(--purple) !important;
  border: none !important;
  color: #fff !important;
}

.wp-block-button__link:hover {
  background: var(--purple-dark) !important;
  transform: translateY(-1px);
}


/* ============================================
   Comments
   ============================================ */
.comment-list .comment {
  border-radius: var(--r-md) !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  border: 1px solid var(--border-light);
}

.comments-area input[type="text"],
.comments-area input[type="email"],
.comments-area textarea {
  border: none !important;
  border-radius: 0 !important;
  padding: 10px 14px !important;
  transition: all var(--t-fast) !important;
  background: #fff !important;
  font-size: 14px !important;
  outline: none !important;
}

.comments-area input[type="text"]:focus,
.comments-area input[type="email"]:focus,
.comments-area textarea:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* 评论表单 - 去除方形边框 */
.com-form > .b2-radius {
  border-radius: var(--r-md) !important;
  overflow: hidden !important;
  border: 1.5px solid var(--border) !important;
}

.com-form-textarea {
  border: none !important;
}

.com-form-input input {
  border: none !important;
  border-bottom: 1px solid var(--border-light) !important;
  border-radius: 0 !important;
  padding: 10px 14px !important;
  transition: all var(--t-fast) !important;
}

.com-form-input input:focus {
  background: var(--gold-bg-03) !important;
  outline: none !important;
}

.com-form-input input:last-child {
  border-left: 1px solid var(--border-light) !important;
}


/* ============================================
   Pagination
   ============================================ */
.pagination .current,
.page-numbers.current {
  background: var(--gold) !important;
  color: #fff !important;
  border-color: var(--gold) !important;
  font-weight: 600 !important;
  border-radius: var(--r-sm) !important;
}

.pagination a:hover,
.page-numbers:hover:not(.current) {
  border-color: var(--gold) !important;
  color: var(--gold-dark) !important;
}

/* ============================================
   Load More Button
   ============================================ */
.load-more {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}

.post-list .load-more .post-load-button {
  width: auto;
  border: none !important;
  padding: 10px 36px;
  font-size: 14px;
  letter-spacing: 0.3px;
  background: var(--text-primary) !important;
  color: #fff !important;
  border-radius: var(--r-full) !important;
  box-shadow: 0 4px 12px rgba(15,23,42,0.15);
  transition: all var(--t-base) !important;
  cursor: pointer;
}

.post-list .load-more .post-load-button:hover {
  background: var(--gold) !important;
  box-shadow: 0 4px 16px var(--gold-bg-25);
  transform: translateY(-1px);
}


/* ============================================
   Modal
   ============================================ */
.modal-content {
  border-radius: var(--r-lg) !important;
  box-shadow: 0 25px 60px rgba(0,0,0,0.12) !important;
}

/* ============================================
   Slider / Carousel
   ============================================ */
.slider-in.b2-radius {
  border-radius: var(--r-lg) !important;
  overflow: hidden !important;
}

.slider-img.b2-radius { border-radius: var(--r-lg) !important; }
.slider-info.b2-radius { border-radius: var(--r-lg) !important; }

.slider-info-box {
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.slider-cat {
  background: var(--gold) !important;
  border-radius: var(--r-full) !important;
  padding: 2px 10px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* Fix empty inline border-left color from B2 backend */
.slider-cat b[style*="border-left"] {
  border-left-color: rgba(255,255,255,0.5) !important;
}

.slider-4-row .flickity-page-dots .dot {
  background: rgba(255,255,255,0.5) !important;
  transition: all var(--t-fast) !important;
}

.slider-4-row .flickity-page-dots .dot.is-selected {
  background: var(--gold) !important;
  transform: scale(1.2);
}

.slider-row-2 .slider-in {
  border-radius: var(--r-md) !important;
  overflow: hidden !important;
}


/* ============================================
   Collection / Shop
   ============================================ */
.collection-item {
  border-radius: var(--r-md) !important;
  overflow: hidden;
  transition: all var(--t-base) !important;
}

.collection-item:hover {
  transform: translateY(-2px);
}

.shop-list-item {
  border-radius: var(--r-md) !important;
  padding: 16px !important;
}

/* ============================================
   Login Modal
   ============================================ */
.login-modal .modal-content,
.register-modal .modal-content {
  border-radius: var(--r-xl) !important;
}

.login-modal input,
.register-modal input {
  border-radius: var(--r-md) !important;
  border: 1.5px solid var(--border) !important;
  transition: all var(--t-fast) !important;
}

.login-modal input:focus,
.register-modal input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px var(--gold-bg-10) !important;
}


/* ============================================
   Misc UI
   ============================================ */
.tippy-box,
.b2-tooltip {
  border-radius: var(--r-sm) !important;
  box-shadow: var(--shadow-lg) !important;
}

.b2-backto-top,
.back-to-top {
  border-radius: 50% !important;
  box-shadow: var(--shadow-md) !important;
  transition: all var(--t-base) !important;
}

.b2-backto-top:hover,
.back-to-top:hover {
  transform: translateY(-3px);
}

.b2-notify,
.b2-toast {
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* Post publish box */
.post-box-content {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.po-post-in.b2-radius {
  border-radius: var(--r-xl) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
  background: #fff !important;
}

.po-post-icons button {
  border-radius: var(--r-md) !important;
  transition: all var(--t-fast) !important;
}

.po-post-icons button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md) !important;
}

/* Mobile menu */
.show-menu-box {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: transparent !important;
}

/* Modal overlay (search etc.) - remove background blur */
.show-modal {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: transparent !important;
}

.show-modal .modal-content {
  background: #fff !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
}

.show-menu-box .menu-box-in {
  box-shadow: var(--shadow-lg) !important;
}

/* Search results */
.search-results .post-list.box {
  margin-bottom: 16px !important;
}

/* Archive header */
.tax-header .wrapper.box {
  border-radius: var(--r-lg) !important;
  overflow: hidden;
}

/* Horizontal scroll cards */
.post-carts-list-row {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.post-carts-list-row::-webkit-scrollbar { display: none; }

.post-carts-list-row .flickity-button {
  background: rgba(255,255,255,0.9) !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: 50% !important;
  transition: all var(--t-fast) !important;
}

.post-carts-list-row .flickity-button:hover {
  background: #fff !important;
  box-shadow: var(--shadow-lg) !important;
}

/* Avatar */
.header-user .top-user-box img,
.comment-list .avatar {
  border-radius: 50% !important;
  border: 2px solid var(--gold-bg-15) !important;
}

/* Loading skeleton */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loading, .b2-loading {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Smooth image loading */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

img.lazy.loaded,
img.lazy[src]:not([src=""]) {
  opacity: 1;
}


/* ============================================
   UI升级 v6.0 - 内容表格样式
   ============================================ */
.entry-content table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: var(--r-md) !important;
  overflow: hidden;
  border: 1px solid var(--border) !important;
  margin: 20px 0 !important;
  font-size: 14px;
}

.entry-content table th {
  background: #F1F5F9 !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  padding: 12px 16px !important;
  text-align: left;
  border-bottom: 2px solid var(--border) !important;
}

.entry-content table td {
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--border-light) !important;
  color: var(--text-secondary);
}

.entry-content table tr:nth-child(even) td {
  background: #FAFBFC;
}

.entry-content table tr:hover td {
  background: var(--gold-bg-03) !important;
}

.entry-content table tr:last-child td {
  border-bottom: none !important;
}


/* ============================================
   UI升级 v6.0 - 渐变强调效果
   ============================================ */

/* 主要CTA按钮渐变 */
.b2-bg,
.b2-color-bg {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
}

/* 模块标题渐变下划线 */
.b2-widget-title h2 {
  font-family: inherit !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  color: var(--text-primary) !important;
}

/* 分类页头部渐变 */
.tax-header .wrapper.box {
  background: linear-gradient(135deg, #0F172A, #1E293B) !important;
  color: #fff !important;
}

.tax-header .wrapper.box h1 {
  color: #fff !important;
  font-weight: 700 !important;
}

.tax-header .wrapper.box .tax-desc {
  color: #94A3B8 !important;
}

/* 标签渐变hover */
.widget .tagcloud a:hover,
.post-tags a:hover,
.single-tags span:hover {
  background: var(--gold-bg-10) !important;
  color: var(--gold-dark) !important;
  border-color: var(--gold-bg-20) !important;
}

/* ============================================
   UI升级 v6.0 - 微交互增强
   ============================================ */

/* 所有可点击元素 */
a, button, .button,
[role="button"],
input[type="submit"],
input[type="button"],
.cursor-pointer {
  cursor: pointer;
}

/* 链接下划线动画 */
.entry-content a:not(.button):not(.btn):not([class*="tag"]) {
  text-decoration: none !important;
  background-image: linear-gradient(var(--gold-bg-20), var(--gold-bg-20)) !important;
  background-size: 0% 2px !important;
  background-position: 0 100% !important;
  background-repeat: no-repeat !important;
  transition: background-size var(--t-base), color var(--t-fast) !important;
  padding-bottom: 1px;
}

.entry-content a:not(.button):not(.btn):not([class*="tag"]):hover {
  background-size: 100% 2px !important;
}

/* 按钮点击反馈 */
button:active:not(:disabled),
.button:active:not(:disabled),
a.button:active {
  transform: scale(0.97) !important;
  transition-duration: 0.1s !important;
}

/* 输入框聚焦动画 */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
textarea,
select {
  transition: border-color var(--t-fast), box-shadow var(--t-fast) !important;
}

/* 图片加载渐入 */
.post-thumb img,
.post-module-thumb img {
  transition: transform var(--t-slow), opacity 0.3s ease-out !important;
}


/* ============================================
   Components - Mobile (768px)
   ============================================ */
@media screen and (max-width: 768px) {

  .search-box-content.modal-content {
    border-radius: var(--r-lg) !important;
    max-width: calc(100% - 24px) !important;
  }

  .post-list .module-title::after {
    height: 2px;
  }

  .post-list-cats a + a {
    margin-left: 8px;
  }

  /* 移动端文章卡片：图片与文字垂直居中对齐 */
  .post-3 .item-in {
    align-items: center !important;
    padding: 12px !important;
  }

  .post-3 .post-module-thumb {
    flex-shrink: 0 !important;
    margin-right: 12px !important;
  }

  .post-3 .post-info {
    padding: 0 !important;
    margin: 0 !important;
  }

  .post-3 .post-info h2 {
    font-size: 15px !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.4 !important;
  }

  .post-3 .post-list-meta-box {
    margin-top: 4px !important;
  }

  .home .post-info .post-excerpt {
    font-size: 12px;
    padding: 6px 10px;
  }

  .comment-list .comment {
    padding: 12px !important;
    margin-bottom: 8px !important;
  }

  .comment-form input[type="submit"] {
    width: 100% !important;
    min-height: 44px !important;
  }

  .slider-info-box {
    font-size: 14px !important;
  }

  .slider-cat {
    font-size: 11px !important;
    padding: 1px 8px !important;
  }

  .po-post-in.b2-radius {
    border-radius: var(--r-lg) !important;
    max-width: 95% !important;
  }

  .po-post-icons button {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .b2-bg,
  .b2-color-bg {
    border-radius: var(--r-md) !important;
  }
}

/* ============================================
   Components - Small Mobile (480px)
   ============================================ */
@media screen and (max-width: 480px) {

  .post-3 .item-in {
    padding: 10px !important;
  }

  .post-3 .post-info h2 {
    font-size: 14px !important;
  }

  .post-list-cats a + a {
    margin-left: 4px;
  }

  .slider-cat {
    font-size: 10px !important;
  }
}

/* ---- 国际分享按钮：X + Telegram ---- */
.social-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.social-share p {
  width: 100%;
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--b2-color-text-3, #888);
}
.poster-share-x,
.poster-share-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  border: none;
}
.poster-share-x {
  background: #000;
  color: #fff;
}
.poster-share-telegram {
  background: #2AABEE;
  color: #fff;
}
.poster-share-x:hover,
.poster-share-telegram:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ---- 快讯列表分享按钮：X + Telegram ---- */
.new-meta-right .new-share-x,
.new-meta-right .new-share-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
  transition: opacity 0.2s;
}
.new-meta-right .new-share-x {
  background: #000;
  color: #fff !important;
}
.new-meta-right .new-share-telegram {
  background: #2AABEE;
  color: #fff !important;
}
.new-meta-right .new-share-x:hover,
.new-meta-right .new-share-telegram:hover {
  opacity: 0.8;
}


/* ============================================
   OAuth 登录图标 - X(Twitter) & Telegram
   ============================================ */

/* 隐藏原始字体图标内容，用 SVG 替换 */
i.bqkx-x-icon,
i.bqkx-telegram-icon {
  font-style: normal;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-size: inherit;
}

/* X (Twitter) 图标 */
i.bqkx-x-icon::before {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622 5.911-5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622 5.911-5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Telegram 图标 */
i.bqkx-telegram-icon::before {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.894 8.221-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.447 1.394c-.16.16-.295.295-.605.295l.213-3.053 5.56-5.023c.242-.213-.054-.333-.373-.12L7.17 13.667l-2.95-.924c-.64-.203-.658-.64.136-.954l11.57-4.461c.537-.194 1.006.131.968.893z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm5.894 8.221-1.97 9.28c-.145.658-.537.818-1.084.508l-3-2.21-1.447 1.394c-.16.16-.295.295-.605.295l.213-3.053 5.56-5.023c.242-.213-.054-.333-.373-.12L7.17 13.667l-2.95-.924c-.64-.203-.658-.64.136-.954l11.57-4.461c.537-.194 1.006.131.968.893z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* 登录按钮颜色点：twitter -> 黑色，telegram -> 蓝色 */
.oauth-login-button a.login-twitter::before {
  background-color: #000000 !important;
}
.oauth-login-button a.login-telegram::before {
  background-color: #2CA5E0 !important;
}
