/**
 * Shiguang 拾光集 - 首页专用样式
 * 毛玻璃 · 简约白 · 插画风
 */

/* ========== Hero（全屏轮播合并版） ========== */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-carousel {
  min-height: 600px;
  height: calc(100vh - var(--nav-height));
  max-height: 820px;
  display: flex;
  padding: 0;
  /* 图片加载前 / 无轮播数据时的深色底 */
  background: linear-gradient(160deg, #232B3B 0%, #171A20 100%);
}

/* 背景轮播幻灯片 */
.hero-slides { position: absolute; inset: 0; z-index: 0; cursor: pointer; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 遮罩：左侧压暗保证文字可读，底部渐变托住信息条 */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(12,15,22,0.82) 0%, rgba(12,15,22,0.55) 42%, rgba(12,15,22,0.15) 78%, rgba(12,15,22,0.05) 100%),
    linear-gradient(0deg, rgba(12,15,22,0.65) 0%, transparent 45%);
}

.hero-carousel .hero-inner {
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; z-index: 2; width: 100%;
  padding-top: 96px; padding-bottom: 40px;
}
.hero-text { max-width: 560px; }
.hero-title { margin-bottom: 16px; }
.hero-title-main {
  font-size: 3.4rem; font-weight: 800; letter-spacing: 0.01em;
  color: #fff; line-height: 1.2;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.hero-subtitle { font-size: 1.25rem; font-weight: 500; color: rgba(255,255,255,0.92); margin-bottom: 12px; min-height: 1.8em; }
.hero-desc { font-size: 15px; color: rgba(255,255,255,0.72); margin-bottom: 30px; line-height: 1.9; }

/* 打字机光标 */
.typing-cursor { display: inline-block; width: 2px; height: 1em; background: var(--primary); margin-left: 2px; animation: blink 1s infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero-ghost { color: #fff !important; background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.4) !important; }
.btn-hero-ghost:hover { background: rgba(255,255,255,0.14) !important; border-color: rgba(255,255,255,0.6) !important; }

/* 底部信息条：精选 chip + 统计 + 指示器 */
.hero-bottom { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; width: 100%; }

.hero-feature {
  display: flex; align-items: center; gap: 12px;
  max-width: min(560px, 100%);
  padding: 10px 18px; border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.hero-feature:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.28); }
.hero-feature-tag {
  flex-shrink: 0; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: var(--primary);
}
.hero-feature-title {
  flex: 1; min-width: 0; font-size: 13.5px; color: rgba(255,255,255,0.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-feature-go { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #FFB85F; }

/* 幻灯片指示器（细条式） */
.hero-dots { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hero-dot {
  width: 24px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.35);
  cursor: pointer; border: none; padding: 0;
  transition: all 0.3s ease;
}
.hero-dot.active { width: 40px; background: #fff; }

/* 无轮播数据时隐藏指示器 */
.hero-no-slide .hero-dots { display: none; }
.hero-no-slide .hero-slides { cursor: default; }

/* 导航栏浮在深色 Hero 上时（未滚动）：暗色玻璃 + 白字；滚动后恢复全局浅色样式 */
.home-page .navbar:not(.scrolled) {
  background: rgba(15, 18, 26, 0.28);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.home-page .navbar:not(.scrolled) .nav-brand-text { color: #fff; }
.home-page .navbar:not(.scrolled) .nav-brand-sub { color: rgba(255, 255, 255, 0.55); }
.home-page .navbar:not(.scrolled) .nav-links a { color: rgba(255, 255, 255, 0.78); }
.home-page .navbar:not(.scrolled) .nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.home-page .navbar:not(.scrolled) .nav-links a.active { color: #fff; }
.home-page .navbar:not(.scrolled) .nav-search { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.16); }
.home-page .navbar:not(.scrolled) .nav-search input { color: #fff; }
.home-page .navbar:not(.scrolled) .nav-search input::placeholder { color: rgba(255, 255, 255, 0.5); }
.home-page .navbar:not(.scrolled) .theme-toggle { background: rgba(255, 255, 255, 0.1); color: #fff; }
.home-page .navbar:not(.scrolled) .nav-hamburger span,
.home-page .navbar:not(.scrolled) .nav-hamburger span::before,
.home-page .navbar:not(.scrolled) .nav-hamburger span::after { background: #fff; }

/* ========== 每日一句 ========== */
.daily-quote-section { padding: 40px 0 20px; }
.daily-quote-card {
  position: relative; max-width: 700px; margin: 0 auto;
  padding: 40px 44px; text-align: center;
  background: var(--card-solid);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.daily-quote-card::before {
  content: '\201C'; position: absolute; top: -10px; left: 20px;
  font-size: 120px; color: rgba(23,28,38,0.045); font-family: Georgia, serif;
  line-height: 1; pointer-events: none;
}
.daily-quote-badge {
  display: inline-block; padding: 0 0 0 2px; margin-bottom: 18px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.35em; text-indent: 0.35em;
  color: var(--text-light);
}
.daily-quote-text {
  font-size: 1.35rem; font-weight: 600; color: var(--text); letter-spacing: 0.01em;
  line-height: 1.9; margin: 0 0 14px; position: relative;
}
.daily-quote-source {
  font-size: 14px; color: var(--text-light); margin-bottom: 16px;
}
.daily-quote-article {
  display: inline-block; padding: 6px 16px;
  font-size: 13px; color: var(--primary);
  background: rgba(108,159,255,0.06); border-radius: 20px;
  cursor: pointer; transition: all 0.3s ease;
}
.daily-quote-article:hover { background: rgba(108,159,255,0.12); }

/* ========== 分类横向滚动 ========== */
.cat-scroll-section { padding-top: 40px; }
.cat-scroll {
  display: flex; gap: 16px; overflow-x: auto; padding: 8px 0 16px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll-item-wrap { flex: 0 0 auto; min-width: 110px; }
.cat-scroll-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 20px; min-width: 110px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  text-decoration: none; color: inherit; transition: all 0.3s ease; cursor: pointer;
}
.cat-scroll-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.cat-scroll-icon { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.cat-scroll-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-scroll-name { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; }
.cat-scroll-count { font-size: 12px; color: var(--text-light); }
.cat-scroll-latest {
  display: block; max-width: 150px; margin: 8px 0 0 2px;
  font-size: 12px; color: var(--text-light); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.2s ease;
}
.cat-scroll-latest:hover { color: var(--primary); }
.cat-scroll-latest i { font-size: 12px; margin-right: 2px; }

/* ========== 主编推荐 ========== */
.picks-section { padding-top: 48px; padding-bottom: 40px; }
.picks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pick-card {
  display: block; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.pick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.pick-cover { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.pick-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.pick-card:hover .pick-cover img { transform: scale(1.04); }
.pick-body { padding: 20px 22px 22px; }
.pick-index {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--primary); margin-bottom: 8px;
}
.pick-title {
  font-size: 1.05rem; font-weight: 600; color: var(--text); line-height: 1.5; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-excerpt {
  font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-more { font-size: 13px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }

/* ========== 文章瀑布流 ========== */
.posts-masonry {
  columns: 2; column-gap: 24px;
}
.post-masonry-item {
  break-inside: avoid; margin-bottom: 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer;
  opacity: 0; transform: translateY(20px);
  transform-style: preserve-3d; perspective: 1000px;
}
.post-masonry-item.visible { opacity: 1; transform: translateY(0); }
.post-masonry-item:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.post-masonry-item.tilt-active { transition: transform 0.1s ease-out; }
.post-masonry-cover { position: relative; overflow: hidden; }
.post-masonry-cover img { width: 100%; display: block; transition: transform 0.5s ease; }
.post-masonry-item:hover .post-masonry-cover img { transform: scale(1.05); }
.post-masonry-read { position: absolute; top: 12px; right: 12px; padding: 4px 10px; font-size: 11px; background: rgba(0,0,0,0.5); color: #fff; border-radius: 20px; }
.post-masonry-body { padding: 18px 20px; }
.post-masonry-cat { display: inline-block; font-size: 12px; color: var(--primary); font-weight: 500; margin-bottom: 8px; }
.post-masonry-title { font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--text); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-masonry-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 12px; }
.post-masonry-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-light); }

/* 列表分页 */
#postsPagination { margin-top: 24px; }
#postsPagination .pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 20px 0; }
#postsPagination .pagination button { min-width: 34px; height: 34px; border-radius: var(--radius-full); font-size: 13px; color: var(--text-secondary); background: var(--card-solid); border: 1px solid var(--border); transition: all var(--transition); display: flex; align-items: center; justify-content: center; cursor: pointer; }
#postsPagination .pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: rgba(108,159,255,0.06); }
#postsPagination .pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 500; }
#postsPagination .pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ========== 最新文章视图切换（卡片 / 列表） ========== */
.section-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
}
.view-switch .view-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-light);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.view-switch .view-btn:hover { color: var(--primary); }
.view-switch .view-btn.active {
  background: var(--primary);
  color: #fff;
}

/* 列表视图：封面在左、内容在右的横向条目 */
.posts-masonry.list-view {
  columns: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.posts-masonry.list-view .post-masonry-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin-bottom: 0;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(16px);
}
.posts-masonry.list-view .post-masonry-item.visible { opacity: 1; transform: none; }
.posts-masonry.list-view .post-masonry-cover {
  flex-shrink: 0;
  width: 168px;
  min-height: 104px;
}
.posts-masonry.list-view .post-masonry-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.posts-masonry.list-view .post-masonry-body {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.posts-masonry.list-view .post-masonry-title {
  font-size: 15px;
  margin-bottom: 6px;
}
.posts-masonry.list-view .post-masonry-excerpt {
  -webkit-line-clamp: 1;
  margin-bottom: 8px;
}
@media (max-width: 480px) {
  .posts-masonry.list-view .post-masonry-cover { width: 110px; min-height: 84px; }
  .posts-masonry.list-view .post-masonry-body { padding: 12px 14px; }
  .posts-masonry.list-view .post-masonry-excerpt { display: none; }
}

/* ========== 热门推荐排行榜 ========== */
.hot-section { background: linear-gradient(180deg, transparent 0%, rgba(255,120,80,0.02) 30%, rgba(255,184,122,0.03) 70%, transparent 100%); }

/* 榜单切换 Tab */
.hot-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px 0 20px;
  flex-wrap: wrap;
}
.hot-tab {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--card-solid);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
}
.hot-tab:hover {
  color: var(--primary);
  border-color: var(--primary-light);
}
.hot-tab.active {
  color: #fff;
  background: var(--primary);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

.hot-list { padding: 8px 0; }
.hot-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 16px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--border); transition: background var(--transition); cursor: pointer; }
.hot-item:last-child { border-bottom: none; }
.hot-item:hover { background: rgba(23,28,38,0.02); }
.hot-rank { font-size: 17px; font-weight: 700; color: var(--text-light); background: none; flex-shrink: 0; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.hot-item:nth-child(1) .hot-rank { color: var(--primary); }
.hot-item:nth-child(2) .hot-rank { color: var(--text-secondary); }
.hot-item:nth-child(3) .hot-rank { color: var(--text-secondary); }
.hot-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hot-item:hover .hot-title { color: var(--primary); }
.hot-views { font-size: 12px; color: var(--text-light); white-space: nowrap; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.hot-views::before { content: ''; display: inline-block; width: 14px; height: 14px; background: currentColor; opacity: 0.4; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); -webkit-mask-size: contain; mask-size: contain; }
.hot-views.likes::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E"); }

/* ========== 精选合集横向滑动 ========== */
.collections-slider {
  display: flex; gap: 24px; overflow-x: auto; padding: 8px 0 16px;
  scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x mandatory;
}
.collections-slider::-webkit-scrollbar { display: none; }
.collection-slide {
  flex: 0 0 320px; scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: all 0.3s ease; cursor: pointer;
  display: block; text-decoration: none; color: inherit;
}
.collection-slide:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.collection-slide-cover { position: relative; padding-top: 56%; overflow: hidden; }
.collection-slide-cover img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.collection-slide:hover .collection-slide-cover img { transform: scale(1.05); }
.collection-slide-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.5), transparent 60%); display: flex; align-items: flex-end; padding: 16px 20px; }
.collection-slide-count { padding: 4px 10px; font-size: 12px; background: rgba(255,255,255,0.2); backdrop-filter: blur(8px); color: #fff; border-radius: 20px; }
.collection-slide-body { padding: 18px 20px; }
.collection-slide-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 8px; }
.collection-slide-desc { font-size: 13px; color: var(--text-light); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }

/* ========== 导航搜索栏 ========== */
.nav-search { display: flex; align-items: center; background: rgba(0,0,0,0.04); border-radius: 20px; padding: 6px 12px; margin-right: 12px; }
.nav-search input { border: none; background: transparent; font-size: 13px; width: 140px; outline: none; color: var(--text); }
.nav-search-btn { border: none; background: transparent; cursor: pointer; font-size: 14px; padding: 0; opacity: 0.6; }
.nav-search-btn:hover { opacity: 1; }

/* 暗色模式按钮 */
.theme-toggle { border: none; background: rgba(0,0,0,0.04); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-right: 8px; font-size: 16px; transition: all 0.3s ease; }
.theme-toggle:hover { background: rgba(108,159,255,0.1); }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }

/* 回到顶部 */
.back-to-top { position: fixed; bottom: 32px; right: 32px; width: 44px; height: 44px; border-radius: 50%; background: var(--card-solid); border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 100; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108,159,255,0.15); border-color: var(--primary); }

/* 页脚更新时间和二维码 */
.footer-update { font-size: 12px; color: var(--text-light); margin-top: 12px; }
.footer-qr { display: flex; align-items: center; justify-content: center; }
.qr-placeholder { width: 100px; height: 100px; background: rgba(0,0,0,0.03); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.qr-placeholder span { font-size: 32px; }
.qr-placeholder small { font-size: 10px; color: var(--text-light); }

/* ========== 暗色模式 ========== */
[data-theme="dark"] {
  --bg: #16181D;
  --card: rgba(31, 35, 43, 0.9);
  --card-solid: #1F232B;
  --glass-border: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #E8EAED;
  --text-secondary: #A5ADB8;
  --text-light: #6E7783;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .nav-search { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .navbar { background: rgba(22,24,29,0.82); }
[data-theme="dark"] .navbar.scrolled { background: rgba(22,24,29,0.94); }
[data-theme="dark"] .nav-links a:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .daily-quote-card::before,
[data-theme="dark"] .contribute-cta::before { color: rgba(255,255,255,0.05); }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .posts-masonry { columns: 2; }
  .collection-slide { flex: 0 0 280px; }
}

@media (max-width: 768px) {
  .hero-carousel { height: auto; min-height: 0; }
  .hero-carousel .hero-inner { min-height: 78vh; padding: 120px 0 80px; }
  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(12,15,22,0.85) 0%, rgba(12,15,22,0.35) 45%, rgba(12,15,22,0.25) 100%);
  }
  .hero-text { max-width: 100%; }
  .hero-title-main { font-size: 2.4rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-bottom { gap: 14px; }
  .hero-dots { margin-left: 0; }
  .daily-quote-card { padding: 24px 20px; }
  .daily-quote-text { font-size: 1rem; }
  .picks-grid { grid-template-columns: 1fr; gap: 18px; }
  .posts-masonry { columns: 1; }
  .nav-search { display: none; }
  .collection-slide { flex: 0 0 260px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-qr { display: none; }
}

@media (max-width: 480px) {
  .hero-carousel .hero-inner { min-height: 80vh; padding-top: 108px; padding-bottom: 74px; }
  .hero-title-main { font-size: 2rem; }
  .hero-desc { margin-bottom: 22px; }
  .hero-feature { padding: 8px 14px; }
  .hero-feature-go { display: none; }
  .cat-scroll-item { min-width: 90px; padding: 12px 14px; }
  .hot-item { grid-template-columns: 32px 1fr; padding: 12px 16px; gap: 12px; }
  .hot-views { display: none; }
  .hot-rank { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
}

/* ========== 官方公告条 ========== */
.announcement-bar {
  background: rgba(108,159,255,0.08);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.announcement-bar:hover {
  background: rgba(108,159,255,0.13);
}

.announcement-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
}

.announcement-inner > i {
  color: #ff8e3c;
  font-size: 17px;
  flex-shrink: 0;
}

.announcement-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-more {
  color: var(--primary);
  font-weight: 600;
  flex-shrink: 0;
  font-size: 12px;
}

/* 公告弹窗 */
.announcement-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.announcement-modal {
  width: 480px;
  max-width: 100%;
  max-height: 82vh;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.announcement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.announcement-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.announcement-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
}

.announcement-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.announcement-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
  white-space: pre-wrap;
}

.announcement-img {
  max-width: 100%;
  border-radius: 10px;
  display: block;
  cursor: zoom-in;
}

.announcement-time {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-light);
}

.announcement-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  text-align: right;
}

/* ========== 账号资产速览 ========== */
.assets-quick-section {
  padding: 0 0 12px;
}

.assets-quick-card {
  background: linear-gradient(135deg, rgba(108,159,255,0.08), rgba(255,184,122,0.08));
  border: 1px solid rgba(108,159,255,0.18);
  border-radius: 18px;
  padding: 18px 22px;
}

.assets-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.assets-quick-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.assets-quick-title i {
  color: var(--primary);
}

.assets-quick-more {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.assets-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.assets-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border-radius: 12px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition);
}

.assets-quick-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(108,159,255,0.3);
}

.aqi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 4px;
}

.aqi-icon.coin { background: rgba(255,184,0,0.14); color: #e6a800; }
.aqi-icon.sign { background: rgba(255,107,107,0.12); color: #ff6b6b; }
.aqi-icon.msg  { background: rgba(108,159,255,0.12); color: var(--primary); }
.aqi-icon.theme{ background: rgba(139,92,246,0.12); color: #8b5cf6; }

.aqi-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.aqi-value.aqi-theme {
  font-size: 13px;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aqi-label {
  font-size: 11px;
  color: var(--text-light);
}

.assets-quick-loading {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  padding: 10px 0;
}

/* ========== 微光书摘 ========== */
.book-excerpt-section {
  padding: 40px 0 8px;
}

.book-excerpt-section .section-subtitle {
  font-size: 12px;
  color: var(--text-light);
}

.book-excerpt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.book-excerpt-card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.book-excerpt-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(108,159,255,0.22);
}

.be-quote {
  flex: 1;
}

.be-quote > i {
  color: rgba(108,159,255,0.35);
  font-size: 22px;
  display: block;
  margin-bottom: 6px;
}

.be-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
}

.be-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.be-source {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.be-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-light);
}

.be-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.be-avatar-default {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(108,159,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--primary);
}

/* ========== 投稿引导 CTA ========== */
.contribute-cta-section {
  padding: 40px 0;
}

.contribute-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 44px;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(108,159,255,0.05), rgba(255,184,122,0.05));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.contribute-cta::before {
  content: '\201C';
  position: absolute;
  top: -30px;
  right: 20px;
  font-size: 160px;
  color: rgba(23,28,38,0.04);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.cta-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cta-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  color: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .book-excerpt-grid { grid-template-columns: repeat(2, 1fr); }
  .assets-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .contribute-cta { flex-direction: column; text-align: center; padding: 26px 20px; }
  .book-excerpt-grid { grid-template-columns: 1fr; }
}

/* ========== 漂流瓶入口横幅 ========== */
.bottle-cta-section { padding-top: 8px; }
.bottle-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(108, 159, 255, 0.06);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.3s ease;
}
.bottle-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.bottle-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bottle-cta-text { flex: 1; min-width: 0; }
.bottle-cta-text strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.bottle-cta-text span {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bottle-cta-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card-solid);
  color: var(--primary);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .bottle-cta { padding: 14px 16px; gap: 12px; }
  .bottle-cta-icon { width: 42px; height: 42px; font-size: 19px; }
  .bottle-cta-text span { max-width: 150px; }
  .bottle-cta-btn { padding: 7px 14px; font-size: 12px; }
}
