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

:root {
  --primary:        #8b5cf6;
  --primary-hover:  #7c3aed;
  --bg-body:        #080808;
  --bg-nav:         #101010;
  --bg-card:        #141414;
  --text-main:      #f0f0f0;
  --text-sub:       #888888;
  --border:         #222222;
  --overlay:        rgba(0,0,0,0.6);
  --nav-height:     68px;
  --ticker-height:  36px;
}

body.dark-mode {
  --bg-body:   #080808;
  --bg-nav:    #101010;
  --bg-card:   #141414;
  --text-main: #f0f0f0;
  --text-sub:  #888888;
  --border:    #222222;
  --overlay:   rgba(0,0,0,0.65);
}

body {
  font-family: "PingFang SC","Microsoft YaHei","Helvetica Neue",sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
  padding-top: var(--nav-height);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ════ NAVBAR ════ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  z-index: 999;
  transition: background .3s, box-shadow .3s;
}
#navbar.scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.15); }

.navbar-inner {
  width: 100%; max-width: 100%;
  margin: 0 auto; height: 100%;
  display: flex; align-items: center;
  padding: 0 16px; gap: 0;
  position: relative;
}

.site-logo img { height: 52px; width: auto; display: block; }
/* 桌面：logo 左置，nav 居中，tools 右置 */
.site-logo { flex-shrink: 0; margin-right: 12px; margin-top: 0; }
.nav-menu  { flex: 1; justify-content: center; }
.nav-tools { margin-left: auto; }
.site-logo-text {
  font-size: 20px; font-weight: 700;
  color: var(--primary); letter-spacing: 1px;
}

/* 导航菜单 */
.nav-menu { display: flex; list-style: none; gap: 0; flex-shrink: 0; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: block; padding: 0 10px;
  line-height: var(--nav-height);
  font-size: 13px; color: var(--text-main);
  transition: color .2s; white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a { color: var(--primary); }
.nav-menu > li.current-menu-item > a { border-bottom: 2px solid var(--primary); }

.sub-menu {
  display: none; position: absolute;
  top: var(--nav-height); left: 0;
  min-width: 130px; background: var(--bg-nav);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  border-radius: 6px; overflow: hidden;
  list-style: none; z-index: 999;
}
.nav-menu > li:hover > .sub-menu { display: block; }
.sub-menu li a {
  display: block; padding: 10px 16px;
  font-size: 14px; color: var(--text-main);
  transition: background .15s;
}
.sub-menu li a:hover { background: var(--primary); color: #fff; }

/* 工具栏 */
.nav-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

.search-wrap { display: flex; align-items: center; position: relative; }
.search-wrap input {
  width: 0; opacity: 0; height: 34px;
  border: 1px solid var(--border); border-radius: 17px;
  padding: 0; font-size: 13px;
  color: var(--text-main); background: var(--bg-card);
  transition: width .3s, opacity .3s, padding .3s; outline: none;
}
.search-wrap.open input { width: 160px; opacity: 1; padding: 0 42px 0 14px; }
.search-wrap input:focus { border-color: var(--primary); }
.search-btn {
  position: relative;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.08);
  cursor: pointer; color: #ccc;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s; flex-shrink: 0;
}
.search-wrap.open .search-btn,
.search-btn:hover { background: var(--primary); color: #fff; }

.dark-btn { display: none !important; }

.hamburger {
  display: none; flex-direction: column;
  gap: 5px; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-main); border-radius: 2px;
}

/* 导航图标按钮 */
.nav-icon-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sub); border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-icon-btn:hover { color: var(--primary); background: rgba(26,188,156,.08); }

/* 圆形社交图标按钮 */
.nav-circle-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: #bbb; flex-shrink: 0;
  transition: background .2s, color .2s, border-color .2s;
}
.nav-circle-btn:hover { background: var(--primary); color: #fff; }

/* 登录/注册按钮 */
.nav-login-btn {
  padding: 5px 16px; border-radius: 8px;
  font-size: 13px; color: #a78bfa;
  border: 1px solid #7c3aed;
  transition: all .2s; white-space: nowrap;
}
.nav-login-btn:hover { border-color: #8b5cf6; color: #fff; background: rgba(139,92,246,.15); }

.nav-reg-btn {
  padding: 5px 16px; border-radius: 8px;
  font-size: 13px; color: #fff; font-weight: 600;
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  box-shadow: 0 2px 10px rgba(139,92,246,.45);
  transition: opacity .2s; white-space: nowrap;
}
.nav-reg-btn:hover { opacity: .88; }

/* 用户头像下拉 */
.nav-user { position: relative; cursor: pointer; }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--primary); display: block;
}
.user-dropdown {
  display: none; position: absolute; top: 42px; right: 0;
  min-width: 130px; background: var(--bg-nav);
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  z-index: 999; overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block; padding: 10px 16px;
  font-size: 13px; color: var(--text-main);
  transition: background .15s;
}
.user-dropdown a:hover { background: rgba(26,188,156,.08); color: var(--primary); }

/* 暗黑按钮已隐藏 */

/* ════ 滚动公告栏 ════ */
.ticker-bar { display: none !important; }
.ticker-bar-hidden {
  height: var(--ticker-height);
  background: var(--primary);
  display: flex; align-items: center; overflow: hidden;
}
.ticker-label {
  flex-shrink: 0; background: #6d28d9; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 0 14px; height: 100%;
  display: flex; align-items: center; letter-spacing: 1px;
}
.ticker-track { flex: 1; overflow: hidden; position: relative; height: 100%; }
.ticker-inner {
  display: flex; align-items: center; height: 100%;
  white-space: nowrap;
  -webkit-animation: ticker-scroll 35s linear infinite;
  animation: ticker-scroll 35s linear infinite;
  will-change: transform;
}
.ticker-inner a { color: #fff; font-size: 13px; margin-right: 60px; opacity: .92; }
.ticker-inner a:hover { opacity: 1; text-decoration: underline; }
@-webkit-keyframes ticker-scroll {
  0%   { -webkit-transform: translateX(0); transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ════ PAGE BANNER ════ */
.page-banner {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.05);
  background: #0b0b0e;
}
.page-banner .banner-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .06; filter: blur(4px);
}
.page-banner .banner-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 32px 24px;
}
.banner-title {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: 6px;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.3;
  text-shadow: 0 2px 20px rgba(233,30,140,.25);
}
.banner-line {
  width: 40px; height: 2px;
  background: linear-gradient(90deg, transparent, #e91e8c, transparent);
  margin: 0 auto 14px;
  border-radius: 2px;
}
.page-banner .banner-sub { display: none; }


/* ════ 面包屑导航 ════ */
.breadcrumb-bar {
  background: #1e1e1e;
  border-bottom: 1px solid #2a2a2a;
  padding: 10px 0;
}
.breadcrumb-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.breadcrumb-home {
  color: var(--primary);
  transition: opacity .2s;
}
.breadcrumb-home:hover { opacity: .8; }
.breadcrumb-sep {
  color: #555;
  font-size: 14px;
  line-height: 1;
}
.breadcrumb-current {
  color: #999;
}

@media (max-width: 768px) {
  .page-banner { height: 25vh; min-height: 90px; }
}

/* ════ 分类筛选 ════ */
.filter-bar {
  background: var(--bg-card);
  border-bottom: none;
  position: sticky; top: var(--nav-height); z-index: 90;
}
.filter-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-tab {
  flex-shrink: 0; padding: 12px 18px;
  font-size: 14px; color: var(--text-sub);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s; white-space: nowrap;
}
.filter-tab:hover { color: var(--primary); }
.filter-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ════ CONTAINER ════ */
.container { max-width: 720px; margin: 0 auto; padding: 24px 16px; }
@media screen and (min-width: 1302px) and (max-width: 1599px) { .container { max-width: 864px; } }
@media screen and (min-width: 1600px) and (max-width: 1799px) { .container { max-width: 896px; } }
@media screen and (min-width: 1800px) { .container { max-width: 960px; } }

/* ════ 文章卡片网格 ════ */
/* ════ 文章卡片列表（宽屏横版，参考51cg1）════ */
.card-grid {
  display: flex; flex-direction: column; gap: 1.5rem;
}

.post-card {
  background: #181818;
  overflow: hidden;
  border-radius: .75rem;
  cursor: pointer;
  position: relative;
  display: block;
  transition: transform .3s ease, box-shadow .3s ease;
  text-decoration: none;
  color: inherit;
}
.post-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 22px 43px rgba(0,0,0,.35); }


.post-card-mask {
  position: relative; width: 100%;
  height: 22rem;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card-mask img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform .4s ease;
}
.post-card:hover .post-card-mask img { transform: scale(1.02); }

/* 底部渐变 */
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,.05) 50%,
    rgba(0,0,0,.82) 100%);
  z-index: 1;
  pointer-events: none;
}

/* 分类标签 */
.post-card-tag {
  position: absolute; top: 14px; left: 16px;
  background: var(--primary); color: #fff;
  font-size: 12px; padding: 3px 10px;
  border-radius: 4px; z-index: 3; letter-spacing: .5px;
}

/* HOT / NEW */
.badge {
  position: absolute; top: 14px; right: 16px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; z-index: 3;
}
.badge-hot { background: #b91c1c; color: #fff; }
.badge-new { background: #5b21b6; color: #fff; }

/* 浏览数 */
.post-card-views { display: none; }

/* 标题 + 元信息：叠在图片底部 */
.post-card-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  z-index: 2;
}
.post-card-title {
  font-size: 1.5625rem; font-weight: 400; line-height: 1.4;
  color: #fff; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: .75rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--primary); }
.post-card-meta {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 4px 8px;
  font-size: .8125rem; color: #eee; font-weight: 400;
  text-align: center;
}
.post-card-meta .dot::before { content: "•"; margin: 0 2px; }

@media (max-width: 768px) {
  .post-card-mask { height: 12.5rem; }
  .post-card-title { font-size: 1.1625rem; }
}
@media (max-width: 336px) {
  .post-card-mask { height: 10.5rem; }
}

/* ════ 单页文章 ════ */
.single-wrap { max-width: 860px; margin: 0 auto; }
.single-header { margin-bottom: 24px; }
.single-cats { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.single-cat {
  background: var(--primary); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 3px;
}
.single-title {
  font-size: 26px; font-weight: 700;
  line-height: 1.4; color: var(--text-main); margin-bottom: 14px;
}
.single-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--text-sub);
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.single-thumb {
  width: 100%;
  overflow: hidden; margin-bottom: 1.5rem;
  height: 22rem;
}
.single-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (max-width: 768px) { .single-thumb { height: 16rem; } }
@media (max-width: 336px)  { .single-thumb { height: 13rem; } }

.entry-content {
  font-size: 16px; line-height: 1.85;
  color: var(--text-main);
}
.entry-content p { margin-bottom: 18px; }
.entry-content img { border-radius: 8px; margin: 12px 0; }
.entry-content h2, .entry-content h3 {
  margin: 24px 0 12px; color: var(--text-main);
}

/* 付费墙遮罩 */
.paywall-mask {
  position: relative; margin-top: 24px;
}
.paywall-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg-body));
}
.paywall-box {
  margin-top: 32px; padding: 28px; text-align: center;
  background: var(--bg-card); border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.paywall-box h3 { font-size: 18px; margin-bottom: 10px; }
.paywall-box p { color: var(--text-sub); margin-bottom: 20px; font-size: 14px; }
.btn-primary {
  display: inline-block; padding: 10px 28px;
  background: var(--primary); color: #fff;
  border-radius: 6px; font-size: 15px; font-weight: 600;
  transition: background .2s;
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline {
  display: inline-block; padding: 10px 28px;
  border: 2px solid var(--primary); color: var(--primary);
  border-radius: 6px; font-size: 15px; font-weight: 600;
  margin-left: 10px; transition: all .2s;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ════ 评论区 ════ */
.comments-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-title { font-size: 18px; font-weight: 700; margin-bottom: 24px; }

.comment-list { list-style: none; }
.comment-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.comment-body { display: flex; gap: 12px; align-items: flex-start; }
.comment-content { flex: 1; }
.comment-author { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.comment-date { font-size: 12px; color: var(--text-sub); }
.comment-text { font-size: 14px; margin-top: 6px; line-height: 1.7; }

.comment-form { margin-top: 28px; }
.comment-form h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.form-row input, .comment-form textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; color: var(--text-main);
  background: var(--bg-card); outline: none;
  transition: border-color .2s;
}
.form-row input:focus, .comment-form textarea:focus { border-color: var(--primary); }
.comment-form textarea { height: 120px; resize: vertical; margin-bottom: 12px; }
.submit-btn {
  padding: 10px 24px; background: var(--primary);
  color: #fff; border: none; border-radius: 6px;
  font-size: 14px; cursor: pointer; transition: background .2s;
}
.submit-btn:hover { background: var(--primary-hover); }

/* ════ PAGINATION ════ */
.pagination {
  margin-top: 32px;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px;
  font-size: 14px; color: var(--text-main);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.pagination .page-numbers.current { font-weight: 700; }

/* ════ FOOTER ════ */
#site-footer {
  margin-top: 48px;
  background: #000000;
  color: #aaa;
  padding: 36px 16px 24px;
  font-size: 13px;
}

.footer-inner { max-width: 1200px; margin: 0 auto; text-align: left; }

.footer-desc {
  color: #ccc; font-size: 14px;
  margin-bottom: 0; line-height: 1.8; text-align: left;
}
.footer-desc h3 {
  font-size: 15px; font-weight: 700; color: #e0e0e0;
  margin-bottom: 10px;
}
.footer-desc p { color: #aaa; margin-bottom: 6px; font-size: 13px; }
.footer-desc a { color: #8b5cf6; text-decoration: none; }
.footer-desc a:hover { text-decoration: underline; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 0;
}
.footer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  transition: color .2s, background .2s, border-color .2s, transform .15s;
  text-align: center;
  letter-spacing: .3px;
}
.footer-links a:hover {
  color: #fff;
  background: rgba(233,30,140,.12);
  border-color: rgba(233,30,140,.35);
  transform: translateY(-2px);
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}
.ficon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #aaa;
  font-size: 11px;
  letter-spacing: .5px;
  transition: color .2s, transform .2s;
}
.ficon svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  transition: background .2s, border-color .2s, transform .2s;
}
.ficon:hover { color: #fff; transform: translateY(-2px); }
.ficon-tg:hover svg  { background: rgba(41,182,246,.18); border-color: rgba(41,182,246,.5); stroke: #29b6f6; }
.ficon-bl:hover svg  { background: rgba(233,30,140,.18); border-color: rgba(233,30,140,.5); stroke: #e91e8c; }
.ficon-home:hover svg{ background: rgba(255,152,0,.18);  border-color: rgba(255,152,0,.5);  stroke: #ff9800; }

.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 18px 0; }

.footer-copyright {
  color: #555; font-size: 12px; line-height: 2; text-align: center;
}

.footer-compliance {
  display: flex; justify-content: center;
  flex-wrap: wrap; gap: 6px 16px;
  margin-top: 12px; text-align: center;
}
.footer-compliance a {
  color: #444; font-size: 11px; transition: color .2s;
}
.footer-compliance a:hover { color: #666; }

/* ════ 底部固定导航栏 ════ */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 997;
  box-shadow: 0 -2px 10px rgba(0,0,0,.2);
}

.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; padding: 6px 0;
  color: var(--text-sub); font-size: 11px;
  transition: color .2s; text-decoration: none;
}
.bottom-nav-item.active,
.bottom-nav-item:hover { color: var(--primary); }

.bottom-nav-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.bottom-nav-icon svg { width: 26px; height: 26px; }

.bottom-nav-placeholder { display: block; height: 64px; }

/* ════ 广告位 ════ */
.ad-slot { width: 100%; overflow: hidden; }
.ad-slot:empty { display: none; }

/* ── 顶部横幅广告  960×120  (8:1) ── */
.ad-top-banner {
  max-width: 1200px; margin: 12px auto;
  padding: 0 16px; text-align: center;
}
.ad-top-banner img {
  width: 960px; height: 120px;
  max-width: 100%; object-fit: cover;
  border-radius: 8px; display: block; margin: 0 auto;
}

/* ── 信息流横幅广告 (穿插在卡片之间的全宽横幅) ── */

@media (min-width: 768px) {
  .ad-infeed-banner a { height: 22rem; } /* 248px — 与桌面卡片封面等高 */
}

/* ── 文章内嵌广告  860×484  (~16:9 与单图一致) ── */
.ad-article {
  max-width: 860px; margin: 24px auto;
  padding: 0; text-align: center;
}
.ad-article img {
  width: 860px; height: 484px;
  max-width: 100%; object-fit: cover;
  border-radius: 8px; display: block; margin: 0 auto;
}

/* ── 底部横幅广告  960×120  (同顶部) ── */
.ad-bottom-banner {
  max-width: 1200px; margin: 24px auto;
  padding: 0 16px; text-align: center;
}
.ad-bottom-banner img {
  width: 960px; height: 120px;
  max-width: 100%; object-fit: cover;
  border-radius: 8px; display: block; margin: 0 auto;
}

/* ── 浮动广告  300×250  (标准矩形) ── */
.ad-float {
  position: fixed; bottom: 80px; right: 16px;
  z-index: 996; width: 300px;
}
.ad-float img {
  width: 300px; height: 250px;
  max-width: 100%; object-fit: cover;
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.35);
  display: block;
}


/* ── 移动端缩小浮动广告 ── */
@media (max-width: 767px) {
  .ad-float { width: 160px; bottom: 72px; }
  .ad-float img { width: 160px; height: 133px; }
}

/* 回到顶部 */
#back-top {
  position: fixed; bottom: 28px; right: 24px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: none; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(139,92,246,.4);
  opacity: 0; transform: translateY(20px);
  transition: opacity .3s, transform .3s; z-index: 998;
}
#back-top.show { opacity: 1; transform: translateY(0); }
#back-top:hover { background: var(--primary-hover); }

/* ════ RESPONSIVE NAV（≤1200px） ════ */
@media (max-width: 1200px) {
  .nav-menu { display: none; }
  /* Mobile: logo 左上角，tools 靠右 */
  .navbar-inner { justify-content: space-between; gap: 8px; }
  .site-logo {
    position: static;
    transform: none;
    margin-right: 0;
    order: 0;
  }
  .site-logo img { height: 36px; }
}

/* ════ MOBILE（≤767px 额外调整） ════ */
@media (max-width: 767px) {
  .single-title { font-size: 20px; }
  .form-row { flex-direction: column; }
  /* 右侧社交图标在极窄屏隐藏 */
  .nav-circle-btn { display: none; }
}

/* ══ SINGLE PAGE ══ */

/* ─── 英雄封面区 ─── */
.single-hero {
    position: relative;
    width: 100%;
    min-height: 320px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}

.single-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.25) 0%,
        rgba(0,0,0,.55) 55%,
        rgba(0,0,0,.88) 100%
    );
    z-index: 1;
}

.single-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 28px;
    text-align: center;
}

.single-title {
    font-size: clamp(20px, 3.5vw, 28px);
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    margin: 0 0 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,.7);
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 10px;
    font-size: 13px;
    color: rgba(255,255,255,.75);
    margin-bottom: 8px;
}

.single-meta svg { vertical-align: -2px; margin-right: 3px; }

.meta-cats { display: flex; gap: 6px; }

.meta-cat-link {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 3px;
    padding: 1px 7px;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: 12px;
    transition: background .2s;
}
.meta-cat-link:hover { background: rgba(255,255,255,.28); }

.single-breadcrumb {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.single-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; }
.single-breadcrumb a:hover { color: #fff; }

/* ─── 广告位：文章上方 ─── */
.ad-single-top {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px 20px 0;
}
.ad-single-top .ad-slot { width: 100%; }

/* ─── 正文容器 ─── */
.single-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.single-content {
    color: #e0e0e0;
    font-size: 16px;
    line-height: 1.85;
}

.single-content p { margin: 0 0 1.2em; }

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 12px auto;
}

.single-content video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
    border-radius: 4px;
    background: #000;
}

/* ─── 下方广告 ─── */
.ad-single-bottom { margin: 24px 0 0; }

/* ─── 标签 ─── */
.single-tags {
    margin: 20px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: #252525;
    border: 1px solid #333;
    color: #bbb;
    font-size: 13px;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.tag-link:hover { background: #333; color: #fff; }

/* ─── 上/下一篇 ─── */
.single-nav {
    display: flex;
    gap: 12px;
    margin: 28px 0 0;
    border-top: 1px solid #272727;
    padding-top: 20px;
    flex-wrap: wrap;
}

.single-nav-prev,
.single-nav-next {
    flex: 1;
    min-width: 200px;
    background: #1a1a1a;
    border: 1px solid #282828;
    border-radius: 6px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background .2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.single-nav-prev:hover,
.single-nav-next:hover { background: #222; }

.single-nav-next { text-align: right; }

.nav-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.nav-title {
    font-size: 14px;
    color: #ccc;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* ─── 移动端适配 ─── */
@media (max-width: 600px) {
    .single-hero { min-height: 220px; }
    .single-title { font-size: 17px; }
    .single-nav { flex-direction: column; }
    .single-nav-next { text-align: left; }
}

/* ══ AUTH PAGES (login / register) ══ */

.auth-page {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px) 16px;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139,92,246,.07) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(124,58,237,.06) 0%, transparent 55%),
        var(--bg-body);
}

.auth-card {
    width: 100%;
    max-width: min(440px, 92vw);
    background: #161616;
    border: 1px solid #252525;
    border-radius: 14px;
    padding: clamp(24px, 5vw, 44px) clamp(20px, 5vw, 40px) clamp(20px, 4vw, 32px);
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.auth-title {
    font-size: clamp(18px, 4vw, 22px);
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0 0 6px;
}

.auth-sub {
    font-size: clamp(12px, 2.5vw, 13px);
    color: #555;
    text-align: center;
    margin-bottom: clamp(18px, 4vw, 28px);
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
}
.auth-alert-err {
    background: rgba(231,76,60,.12);
    border: 1px solid rgba(231,76,60,.3);
    color: #e87070;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field-icon {
    position: absolute;
    left: 13px;
    color: #555;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.auth-field input {
    width: 100%;
    padding: 12px 42px 12px 40px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 9px;
    color: #e0e0e0;
    font-size: clamp(13px, 2.5vw, 14px);
    outline: none;
    transition: border-color .2s, background .2s;
    -webkit-appearance: none;
}
.auth-field input::placeholder { color: #3a3a3a; }
.auth-field input:focus {
    border-color: #8b5cf6;
    background: #202020;
}

.auth-eye {
    position: absolute;
    right: 11px;
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .2s;
}
.auth-eye:hover { color: #888; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
}
.auth-remember input[type=checkbox] {
    width: 14px; height: 14px;
    accent-color: #8b5cf6;
    cursor: pointer;
}

.auth-forgot {
    font-size: 12px;
    color: #555;
    text-decoration: none;
    transition: color .2s;
}
.auth-forgot:hover { color: #8b5cf6; }

.auth-submit {
    width: 100%;
    padding: clamp(11px, 2.5vw, 14px);
    margin-top: 4px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    border: none;
    border-radius: 9px;
    color: #fff;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 4px 16px rgba(26,188,156,.28);
}
.auth-submit:hover  { opacity: .88; transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }

.auth-terms {
    font-size: 11px;
    color: #3a3a3a;
    text-align: center;
    margin-top: -4px;
}
.auth-terms a { color: #4a4a4a; text-decoration: underline; }
.auth-terms a:hover { color: #8b5cf6; }

.auth-switch {
    text-align: center;
    font-size: 13px;
    color: #555;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #1e1e1e;
}
.auth-switch a { color: #8b5cf6; font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* 密码强度条 */
.pwd-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -4px;
}
.pwd-bar {
    flex: 1;
    height: 2px;
    background: #252525;
    border-radius: 2px;
    overflow: hidden;
}
.pwd-fill {
    height: 100%;
    border-radius: 2px;
    transition: width .3s, background .3s;
}
.pwd-strength span { font-size: 11px; color: #666; white-space: nowrap; min-width: 70px; }

/* 导航登录/注册按钮 */
.nav-login-btn {
    padding: 5px 13px;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 13px;
    color: #bbb;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}
.nav-login-btn:hover { border-color: #7c3aed; color: #a78bfa; }

.nav-reg-btn {
    padding: 5px 13px;
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    border-radius: 6px;
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    transition: opacity .2s;
    white-space: nowrap;
}
.nav-reg-btn:hover { opacity: .85; }

@media (max-width: 400px) {
    .auth-card { border-radius: 10px; }
    .auth-title { font-size: 17px; }
}

/* ════ Ad styles — matching 51cg1.com card dimensions ════ */
.post-card.ad-card-infeed { display:block; text-decoration:none; cursor:pointer; }
.post-card.ad-card-infeed .post-card-mask { padding-top:49.26%; min-height:200px; }
.post-card.ad-card-infeed .post-card-mask img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.post-card-mask.post-card-ads { background-color:rgba(0,0,0,.05); }
.post-card-tag.ad-tag { background:rgba(255,120,0,.85); color:#fff; }

.ad-float { position:fixed; bottom:80px; right:16px; z-index:9999; width:184px; border-radius:8px; overflow:hidden; box-shadow:0 4px 16px rgba(0,0,0,.3); }
.ad-float img { display:block; width:100%; height:auto; }
.ad-float-close { position:absolute; top:4px; right:4px; z-index:1; background:rgba(0,0,0,.5); color:#fff; border:none; border-radius:50%; width:22px; height:22px; font-size:12px; cursor:pointer; line-height:22px; text-align:center; padding:0; }


.ad-slot.ad-top-banner,.ad-slot.ad-bottom-banner { width:100%; text-align:center; margin:12px 0; }
.ad-slot.ad-top-banner img,.ad-slot.ad-bottom-banner img { max-width:100%; height:auto; border-radius:8px; }


/* Banner strip (top/bottom) */



/* Inline jump — sits at the end of the pagination row */
.pj-label {
  font-size: 13px;
  color: var(--text-sub, #888);
  white-space: nowrap;
}
.pj-input {
  width: 52px;
  height: 36px;
  padding: 0 6px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-card, #fff);
  color: var(--text-main, #333);
  transition: border-color .2s, box-shadow .2s;
  -moz-appearance: textfield;
}
.pj-input:focus {
  outline: none;
  border-color: var(--primary, #e53935);
  box-shadow: 0 0 0 2px rgba(229,57,53,.15);
}
.pj-input::-webkit-inner-spin-button,
.pj-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.pj-btn {
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 6px;
  background: var(--primary, #e53935);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transition: opacity .18s, transform .12s;
}
.pj-btn:hover  { opacity: .88; }
.pj-btn:active { transform: scale(.95); }

/* Mobile: stack jump below page links */
@media (max-width: 480px) {
  .page-nav .pagination { gap: 5px; }
  }



/* ── 2. 文字按钮广告 (txt-apps / article_top_txt)
   4列网格, 带边框, 匹配51cg1.com
──────────────────────────────────────────────────────── */
.txt-apps-wrap {
  overflow: hidden;
  position: relative;
  margin-bottom: 1.2rem;
  mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.txt-apps {
  display: flex;
  flex-wrap: nowrap;
  gap: .6rem;
  padding: .25rem 0 .4rem;
  width: max-content;
  -webkit-animation: txt-marquee 28s linear infinite;
  animation: txt-marquee 28s linear infinite;
  will-change: transform;
}
.txt-apps:hover { -webkit-animation-play-state: paused; animation-play-state: paused; }
@-webkit-keyframes txt-marquee {
  0%   { -webkit-transform: translateX(0); transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes txt-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.txt-apps a {
  flex: 0 0 auto;
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem .6rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139,92,246,.14), rgba(79,70,229,.08));
  border: 1px solid rgba(139,92,246,.22);
  color: #cbbfff !important;
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.txt-apps a:hover {
  background: linear-gradient(135deg, rgba(139,92,246,.38), rgba(79,70,229,.28));
  border-color: #8b5cf6;
  color: #fff !important;
}

/* ── btn-app (also used for .article-bottom-apps style) */
.btn-app {
  display: inline-block;
  text-decoration: none;
}

/* ── 3. 信息流广告卡 (ad-card-infeed) — 812×400 → ratio 49.26%
   (rules defined above at .post-card.ad-card-infeed lines)
──────────────────────────────────────────────────────── */

/* ── 4. 悬浮广告 (.ad-float) — 80px手机 / 100px桌面
──────────────────────────────────────────────────────── */
.ad-float {
  position: fixed;
  right: 1.875rem;
  bottom: 3.9375rem;
  z-index: 9999;
  display: none;          /* shown via JS */
}
.ad-float .ad-float-img-wrap {
  width: 5rem;            /* 80px mobile */
  height: 5rem;
  position: relative;
}
.ad-float .ad-float-img-wrap a {
  display: block;
  width: 100%;
  height: 100%;
}
.ad-float .ad-float-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: .625rem;
}
.ad-float-close {
  width: 1.8rem;
  height: 1.8rem;
  position: absolute;
  top: -1.8rem;
  right: 1.5rem;
  cursor: pointer;
  z-index: 2;
  background: rgba(0,0,0,.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}
@media (min-width: 960px) {
  .ad-float .ad-float-img-wrap {
    width: 6.25rem;       /* 100px desktop */
    height: 6.25rem;
  }
  .ad-float-close {
    width: 1.5625rem;
    height: 1.5625rem;
    top: -.9375rem;
    right: -.9375rem;
  }
}
/* Desktop: position right of center content */
@media (min-width: 768px)  and (max-width: 1301px)  { .ad-float { left: 50%; right: auto; transform: translateX(24.25rem); bottom: 4.4375rem; } }
@media (min-width: 1302px) and (max-width: 1599px)  { .ad-float { left: 50%; right: auto; transform: translateX(30.0rem);  bottom: 4.4375rem; } }
@media (min-width: 1600px) and (max-width: 1799px)  { .ad-float { left: 50%; right: auto; transform: translateX(32.0rem);  bottom: 4.4375rem; } }
@media (min-width: 1800px)                           { .ad-float { left: 50%; right: auto; transform: translateX(32.5rem);  bottom: 4.4375rem; } }




/* ── 7. 年龄验证弹窗 — 完全匹配51cg1.com样式 */
.warning-container {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,1);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.warning-container.show { display: flex; }
.warning-container .warning-flex-box {
  width: 100%;
  max-width: 600px;
  background: #111;
  padding: 3rem 2rem;
  position: relative;
  box-shadow: rgba(255,255,255,.05) 0 0 300px 50px;
}
.warning-container .warning-flex-box .option-container {
  position: absolute;
  top: .5rem;
  left: .5rem;
}
.option-container .select-dropdown {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: #292828;
  border-radius: 4px;
  position: relative;
  padding: 0 .5rem;
}
.option-container .select-dropdown select {
  font-size: 1rem;
  font-weight: normal;
  padding: 8px 24px 8px 10px;
  border: none;
  background-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  color: white;
  cursor: pointer;
}
.option-container .select-dropdown select:focus { outline: none; }
.option-container .select-dropdown:after {
  content: "";
  position: absolute;
  top: 50%; right: 8px;
  width: 0; height: 0;
  margin-top: -2px;
  border-top: 5px solid white;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}
.warning-container .content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}
.warning-container .content-container .logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: #e53935;
  letter-spacing: 3px;
  margin-bottom: .5rem;
}
.warning-container .content-container p {
  margin-top: 1rem;
  width: 90%;
  line-height: 2;
  text-align: center;
  font-size: .95rem;
  color: #ccc;
}
.warning-container .flex-button {
  width: 90%;
  margin-top: 2rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
}
.warning-container .flex-button button {
  flex: 1;
  padding: .5rem 2rem;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 4px;
  transition: opacity .18s;
}
.warning-container .flex-button button:hover { opacity: .88; }
.warning-container .flex-button .cancle {
  background-color: black;
  border: 1px solid white;
  color: white;
}
.warning-container .flex-button .confirm {
  border: 0;
  color: black;
  background: linear-gradient(50deg, #ff0070 10%, #ff687b 90%, #ff7a7d 100%);
}
body.show-18j-popup { overflow: hidden; }
@media (max-width: 768px) {
  .warning-container .warning-flex-box { padding: 15vw 5vw 10vw; }
  .warning-container .flex-button { flex-direction: column; }
  .warning-container .flex-button .confirm { margin-top: 5vw; }
}

/* ── 8. 翻页跳转 */
.pj-input {
  width: 72px;
  cursor: text;
  font-weight: 600;
  text-align: center;
  padding: 0 4px;
  -moz-appearance: textfield;
}
.pj-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(229,57,53,.15);
}
.pj-input::-webkit-inner-spin-button,
.pj-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.pj-go {
  width: auto;
  padding: 0 16px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}
.pj-go:hover  { opacity: .85; }
.pj-go:active { transform: scale(.94); }
/* ── 翻页下方2列横幅广告网格 ── */


/* ── 大弹窗 (.adnotice) 单图轮播 ─────────────────── */
.adnotice {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
}
.notice-wrap {
  position: relative;
  max-width: min(340px, 86vw);
  animation: noticeIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes noticeIn {
  from { opacity:0; transform:scale(.86); }
  to   { opacity:1; transform:scale(1); }
}
.notice-img-link { display: block; }
.notice-img-link img {
  width: 100%;
  min-height: 280px;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 0 0 2px rgba(139,92,246,.5), 0 24px 70px rgba(0,0,0,.8);
  background: #1a1a1a;
  object-fit: cover;
}
.notice-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  color: #fff;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(139,92,246,.7);
  transition: transform .2s, box-shadow .2s;
  z-index: 1;
}
.notice-close-btn:hover {
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 6px 20px rgba(139,92,246,.9);
}

/* ── 应用中心弹窗 (.adspop) ─────────────────── */
.adspop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
}
.adspop-inner {
  max-width: 94vw;
  width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn {
  from { opacity:0; transform:scale(.88); }
  to   { opacity:1; transform:scale(1); }
}
.adspop-header { width: 100%; }
.adspop-header img {
  width: 100%;
  vertical-align: top;
  display: block;
  border-radius: 12px 12px 0 0;
}
.adspop-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: #242424;
  padding: 14px 10px;
  border-radius: 0 0 15px 15px;
  box-sizing: border-box;
  max-height: 55vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #555 #242424;
}
.adspop-grid::-webkit-scrollbar { width: 3px; }
.adspop-grid::-webkit-scrollbar-thumb { background: #555; border-radius: 2px; }
.adspop-grid a {
  text-decoration: none;
  color: #e0e0e0;
  text-align: center;
  display: block;
}
.adspop-grid a img {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 9px;
  display: block;
  margin: 0 auto;
  background: #333;
  object-fit: cover;
}
.adspop-grid a p {
  font-size: 11px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adspop-close-row {
  margin-top: 14px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  cursor: pointer;
  padding: 5px 20px;
  background: rgba(255,255,255,.06);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1);
  transition: all .2s;
  user-select: none;
}
.adspop-close-row:hover { color: #fff; background: rgba(255,255,255,.12); }

/* ── Banner ads — aspect-ratio approach (950×110 / 812×400) ─────────────── */

/* 1. 顶/底横幅 .horizontal-block  950×110 */
.horizontal-block {
  width: 100%;
  padding: .5rem 0;
}
.horizontal-block a {
  display: block;
  width: 100%;
  aspect-ratio: 950 / 110;
  overflow: hidden;
  background: #363636;
  border-radius: 4px;
  margin-bottom: .5rem;
}
.horizontal-block a:last-child { margin-bottom: 0; }
.horizontal-block a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

/* 2. 信息流 .ad-infeed-banner  812×400 */
.ad-infeed-banner {
  width: 100%;
  margin: .5rem 0;
}
.ad-infeed-banner a {
  display: block;
  width: 100%;
  aspect-ratio: 812 / 400;
  overflow: hidden;
  background: #363636;
  border-radius: 4px;
}
.ad-infeed-banner a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3. 底部网格 .banner-grid  950×110 两列 */
.banner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px 0 16px;
}
.banner-grid a {
  display: block;
  width: 100%;
  aspect-ratio: 950 / 110;
  overflow: hidden;
  background: #363636;
  border-radius: 4px;
}
.banner-grid a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}
@media (max-width: 480px) {
  .banner-grid { grid-template-columns: 1fr; }
}

/* ====== 文章关键词标签 ====== */
.entry-tags {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1.5rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border, #e8e8e8);
  overflow: hidden;
}
.dark .entry-tags { border-color: rgba(255,255,255,.1); }
.entry-tags-label {
  font-size: .85rem;
  color: var(--text-sub, #888);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 10px;
}
.tag-rows {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tag-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  -webkit-animation: tag-scroll-left 22s linear infinite;
  animation: tag-scroll-left 22s linear infinite;
  will-change: transform;
}
.tag-row-2 {
  animation-duration: 30s;
}
@-webkit-keyframes tag-scroll-left {
  0%   { -webkit-transform: translateX(0); transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes tag-scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.entry-tag-link {
  display: inline-block;
  padding: 4px 13px;
  background: rgba(61,126,232,.12);
  color: #7db3ff;
  border: 1px solid rgba(61,126,232,.25);
  border-radius: 20px;
  font-size: .78rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.entry-tag-link:hover {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
}
.dark .entry-tag-link {
  background: rgba(139,92,246,.12);
  color: #a78bfa;
  border-color: rgba(139,92,246,.25);
}
.dark .entry-tag-link:hover {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
}

/* ====== 评论区（51cg1风格） ====== */
.cg51-comments-section { margin-top:2.5rem; padding-top:1.5rem; border-top:1px solid rgba(255,255,255,.1); }

/* ── 标题栏 ── */
.cg51-ch {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.2rem;
}
.cg51-ch-text {
  font-size: 1rem;
  font-weight: 600;
  color: #e8e8e8;
  letter-spacing: .5px;
}
.cg51-ch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e91e8c;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  line-height: 1;
}

/* ── 发表区 ── */
.cg51-respond {
  margin-bottom: 1.5rem;
}
.cg51-field-row { margin-bottom: .6rem; }
.cg51-field-row input,
.cg51-field-row textarea {
  width: 100%;
  padding: .6rem .85rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: #e8e8e8;
  font-size: .875rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s;
  resize: none;
  font-family: inherit;
}
.cg51-field-row input::placeholder,
.cg51-field-row textarea::placeholder { color: rgba(255,255,255,.3); }
.cg51-field-row input:focus,
.cg51-field-row textarea:focus { border-color: rgba(233,30,140,.5); }
.cg51-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: .5rem;
}
.cg51-submit-btn {
  padding: .5rem 1.4rem;
  background: linear-gradient(135deg, #e91e8c, #c2185b);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .5px;
  transition: opacity .2s;
}
.cg51-submit-btn:hover { opacity: .85; }
.cg51-must-login {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: rgba(255,255,255,.5);
  font-size: .875rem;
}
.cg51-must-login a { color: #e91e8c; text-decoration: none; }
.cg51-must-login a:hover { text-decoration: underline; }
.cg51-closed { color: rgba(255,255,255,.4); font-size: .875rem; padding: .5rem 0; }

/* ── 评论列表 ── */
.cg51-comment-item { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.cg51-comment-item:last-child { border-bottom: none; }
.cg51-comment-row { display: flex; gap: .7rem; align-items: flex-start; }
.cg51-av { flex-shrink: 0; width: 2rem; height: 2rem; }
.cg51-av-img { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; display: block; }
.cg51-comment-body { flex: 1; min-width: 0; }
.cg51-comment-meta { display: flex; align-items: center; gap: .4rem; margin-bottom: .2rem; }
.cg51-author { font-size: .8rem; font-weight: 600; color: #e91e8c; flex-shrink: 0; }
.cg51-reply-btn { margin-left: auto; font-size: .72rem; color: rgba(255,255,255,.35); cursor: pointer; flex-shrink: 0; transition: color .15s; }
.cg51-reply-btn:hover { color: #e91e8c; }
.cg51-comment-date { font-size: .72rem; color: rgba(255,255,255,.3); margin-bottom: .3rem; }
.cg51-comment-text { font-size: .875rem; line-height: 1.65; color: rgba(255,255,255,.8); word-break: break-word; }
.cg51-badge-img { display: inline-block; vertical-align: middle; margin-top: -.1em; flex-shrink: 0; }

/* ── 子评论 ── */
.cg51-children-wrap { margin-top: .6rem; padding-left: .8rem; border-left: 2px solid rgba(233,30,140,.25); }
.cg51-child-item { padding: .45rem 0; }
.cg51-child-item .cg51-av { width: 1.5rem; height: 1.5rem; }
.cg51-child-item .cg51-av-img { width: 1.5rem; height: 1.5rem; }
.cg51-expand-btn { font-size: .75rem; color: #e91e8c; cursor: pointer; padding: .3rem 0; opacity: .8; }
.cg51-expand-btn:hover { opacity: 1; }

/* ── 加载更多 ── */
.cg51-load-more {
  display: block; width: 100%; padding: .7rem;
  margin-top: .6rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: rgba(255,255,255,.4);
  font-size: .85rem;
  cursor: pointer;
  transition: .2s;
}
.cg51-load-more:hover { border-color: #e91e8c; color: #e91e8c; }

@media(max-width:480px){
  .cg51-av { width: 1.75rem; height: 1.75rem; }
  .cg51-av-img { width: 1.75rem; height: 1.75rem; }
}

/* ════ 文章卡片评论数 ════ */
.post-card-comments {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 11px; color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.48);
  padding: 2px 7px; border-radius: 4px;
  pointer-events: none; z-index: 3;
  letter-spacing: .3px;
}

/* ════ 底部固定导航栏响应式 ════ */
@media (min-width: 768px) {
  #bottom-nav { display: none; }
  .bottom-nav-placeholder { display: none; }
}
@media (max-width: 767px) {
  #back-top { bottom: 4.75rem; }
}

/* ════ 文章详情页 — 热门分类 ════ */
.cg51-hot-cats { margin: 1.5rem 0 1rem; }
.cg51-hot-cats-hd { font-size: 1rem; font-weight: 700; margin-bottom: .9rem; color: #fff; display: flex; align-items: center; gap: .5rem; padding: .45rem 1rem .45rem .7rem; background: linear-gradient(90deg, rgba(139,92,246,.18), transparent); border-left: 3px solid #8b5cf6; border-radius: 0 8px 8px 0; letter-spacing: .02em; }
.cg51-cat-table { display: none; }
.cg51-cat-flex {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: .8rem;
}
.cg51-cat-flex a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: 1rem .4rem .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  color: #c8bfee !important;
  font-size: .88rem;
  text-decoration: none;
  transition: all .2s;
  text-align: center;
}
.cg51-cat-flex a .cat-ic {
  font-size: 1.5rem;
  line-height: 1;
}
.cg51-cat-flex a:hover {
  background: rgba(139,92,246,.18);
  border-color: rgba(139,92,246,.45);
  color: #fff !important;
  transform: translateY(-2px);
}
@media (max-width: 480px) { .cg51-cat-flex { grid-template-columns: repeat(3,1fr); } }

/* ════ 文章详情页 — 上一篇/下一篇 ════ */
.post-near {
  color: #8b5cf6; font-size: 1rem; font-weight: 500;
  background: rgba(255,255,255,.04); word-break: break-word;
  margin: 1rem 0; border-radius: 4px; overflow: hidden;
}
.post-near nav { display: table; width: 100%; }
.post-near .prev,
.post-near .next { width: 50%; display: table-cell; vertical-align: top; }
.post-near .prev { border-right: 1px solid rgba(255,255,255,.1); }
.post-near .next { text-align: right; }
.post-near .prev > a,
.post-near .next > a {
  display: block; padding: 1rem 1.25rem;
  color: #ccc; text-decoration: none;
  transition: background .2s;
}
.post-near .prev > a:hover,
.post-near .next > a:hover { background: rgba(255,255,255,.04); }
.post-near .prev > a.post-near-no-content,
.post-near .next > a.post-near-no-content { cursor: default; opacity: .5; }
.post-near .prev > a.post-near-no-content:hover,
.post-near .next > a.post-near-no-content:hover { background: none; }
.prev-t { font-size: .8125rem; display: block; margin-bottom: .3rem; }
.color-main { color: #8b5cf6 !important; }
.post-near-span { font-size: .9375rem; line-height: 1.5; }

/* ════ 文章详情页 — 版权声明 ════ */
.content-copyright {
  font-size: .875rem; color: #777;
  padding-top: .5rem; line-height: 1.8;
}
.content-copyright a { color: #8b5cf6; }

/* ════ 文章详情页 — 最新地址 ════ */


@media (max-width: 599px) {
  .cg51-cat-table a { font-size: .8rem; }
  .cg51-cat-table th, .cg51-cat-table td { padding: .55rem .25rem; }
  .post-near .prev > a, .post-near .next > a { padding: .75rem .75rem; }
  .post-near-span { font-size: .875rem; }
}

/* ════ 往期内容页 ════ */
.archive-page-wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }
.archive-page-title { font-size: 1.6rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.archive-page-sub { font-size: .9rem; color: var(--text-sub); margin-bottom: 28px; }

.archive-section-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.archive-section-label { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.archive-more-link { font-size: .8rem; color: var(--primary); text-decoration: none; }
.archive-more-link:hover { text-decoration: underline; }

.archive-tags-section { margin-bottom: 36px; }
.archive-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-tag { display: inline-block; padding: 4px 12px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-sub); text-decoration: none; transition: all .18s; line-height: 1.5; }
.archive-tag:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.archive-posts-section { }
.archive-list { display: flex; flex-direction: column; gap: 0; }
.archive-day-group { display: flex; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.05); align-items: flex-start; }
.archive-day-group:last-child { border-bottom: none; }
.archive-day-label { flex-shrink: 0; width: 52px; font-size: .8rem; font-weight: 700;
  color: var(--primary); padding-top: 2px; font-family: monospace; }
.archive-day-posts { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.archive-post-link { font-size: .88rem; color: var(--text-main); text-decoration: none;
  line-height: 1.5; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-post-link:hover { color: var(--primary); }

.archive-pagination { margin-top: 32px; display: flex; justify-content: center; }
.archive-pagination .page-numbers { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; }
.archive-pagination .page-numbers li a,
.archive-pagination .page-numbers li span { display: inline-block; padding: 6px 14px;
  border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-main); text-decoration: none; font-size: .85rem; transition: all .18s; }
.archive-pagination .page-numbers li span.current,
.archive-pagination .page-numbers li a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

@media (max-width: 599px) {
  .archive-day-group { gap: 8px; }
  .archive-day-label { width: 44px; font-size: .75rem; }
  .archive-post-link { font-size: .82rem; }
}


/* ── 年龄验证弹窗 ─────────────────────────────── */
body.aw-open { overflow: hidden; }
.aw-overlay {
  position: fixed; inset: 0; z-index: 100001;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.aw-card {
  position: relative;
  background: linear-gradient(160deg, #111 0%, #0d0d1a 100%);
  border-radius: 24px;
  max-width: 420px; width: 92vw;
  padding: 32px 28px 28px;
  text-align: center; color: #fff;
  border: 1px solid rgba(180,80,255,.3);
  box-shadow: 0 0 0 1px rgba(233,30,140,.15), 0 20px 60px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
  animation: awIn .35s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes awIn {
  from { opacity:0; transform:scale(.88) translateY(20px); }
  to   { opacity:1; transform:scale(1)   translateY(0); }
}
.aw-lang { display:flex; justify-content:flex-start; margin-bottom:20px; }
.aw-lang-inner {
  display:flex; align-items:center; gap:6px;
  background:#1c1c2e; border-radius:8px; padding:5px 12px;
  border:1px solid rgba(255,255,255,.1);
}
.aw-globe { font-size:14px; }
.aw-lang-inner select {
  background:transparent; border:none; color:#ccc;
  font-size:13px; cursor:pointer; outline:none;
}
.aw-badge {
  font-size:36px; margin-bottom:8px; line-height:1;
  filter: drop-shadow(0 0 12px rgba(233,30,140,.6));
}
.aw-logo { height:52px; width:auto; display:block; margin:0 auto 16px; }
.aw-title {
  font-size:17px; font-weight:800; letter-spacing:.5px;
  margin:0 0 14px;
  background: linear-gradient(90deg,#e91e8c,#9c27b0);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
}
.aw-desc { font-size:13px; color:#999; line-height:1.85; margin:0 0 24px; }
.aw-btns { display:flex; flex-direction:column; gap:12px; }
.aw-btn {
  width:100%; padding:15px;
  border-radius:14px; font-size:15px; font-weight:700;
  cursor:pointer; transition:opacity .18s, transform .12s;
  letter-spacing:.5px;
}
.aw-confirm {
  background: linear-gradient(135deg, #e91e8c 0%, #c2185b 60%, #ad1457 100%);
  color:#fff; border:none;
  box-shadow: 0 4px 20px rgba(233,30,140,.45);
}
.aw-confirm:hover  { opacity:.9; transform:translateY(-1px); }
.aw-confirm:active { transform:scale(.97); }
.aw-cancel {
  background:rgba(255,255,255,.05); color:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.12); font-size:13px; padding:11px;
}
.aw-cancel:hover { color:rgba(255,255,255,.75); background:rgba(255,255,255,.08); }
/* ── 文章最新地址区块 ────────────────────────── */
.cg51-address-block {
  margin: 28px 0;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.addr-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
  letter-spacing: .5px;
}
.addr-icon { font-size: 15px; }
.addr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.addr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 8px;
  text-decoration: none;
  border-right: 1px solid rgba(255,255,255,.06);
  transition: background .2s;
}
.addr-item:last-child { border-right: none; }
.addr-item:hover { background: rgba(233,30,140,.08); }
.addr-tag {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.addr-main .addr-tag { color: #e91e8c; }
.addr-url {
  font-size: 12px;
  color: #ccc;
  word-break: break-all;
  text-align: center;
}
.addr-main .addr-url { color: #fff; font-weight: 600; }
@media(max-width: 480px) {
  .addr-grid { grid-template-columns: 1fr; }
  .addr-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 16px; }
  .addr-item:last-child { border-bottom: none; }
}
/* ── Banner 滚动字幕 ─────────────────────────── */
.banner-marquee {
  width: 90%;
  max-width: 900px;
  overflow: hidden;
  margin: 0 auto;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.mq-track { display: flex; width: 100%; overflow: hidden; }
.mq-inner {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: max-content;
  white-space: nowrap;
  -webkit-animation: mqScroll 160s linear infinite;
  animation: mqScroll 160s linear infinite;
  will-change: transform;
}
.mq-inner:hover { -webkit-animation-play-state: paused; animation-play-state: paused; }
@-webkit-keyframes mqScroll {
  0%   { -webkit-transform: translateX(0); transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); transform: translateX(-50%); }
}
@keyframes mqScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.mq-item {
  font-size: 11px;
  color: rgba(255,255,255,.30);
  letter-spacing: 1px;
  padding: 0 8px;
  cursor: default;
  pointer-events: none;
  user-select: none;
}
.mq-dot {
  color: rgba(233,30,140,.35);
  font-size: 9px;
  padding: 0 2px;
}