/* ============================================================
   淘客优惠券网站 — 温暖精选杂志风
   Design: Warm Curated Market
   
   色彩系统:
   --c-primary:   #C24B2B (赤陶色，温暖有力)
   --c-accent:    #C8963E (琥珀金，用于价格高亮)
   --c-bg:        #FAF6F0 (暖奶油白)
   --c-surface:   #FFFFFF
   --c-text:      #1D1D2B (深靛黑)
   --c-muted:     #6B6B7B
   --c-border:    #EDE8E0
   
   字体:
   标题: "Noto Serif SC" (衬线，有品位)
   正文: 系统字体栈
   
   间距: 4pt 基础 (4, 8, 12, 16, 20, 24, 32, 48, 64)
   圆角: 8/12/999 三级
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --c-primary: #C24B2B;
  --c-primary-light: #E8633F;
  --c-primary-bg: #FDF3EE;
  --c-accent: #C8963E;
  --c-accent-bg: #FFF8ED;
  --c-bg: #FAF6F0;
  --c-surface: #FFFFFF;
  --c-text: #1D1D2B;
  --c-text-secondary: #6B6B7B;
  --c-muted: #9B9BAA;
  --c-border: #EDE8E0;
  --c-border-light: #F3EFE8;
  --c-success: #2A8C5A;
  --c-hot: #D44A2E;
  
  --shadow-sm: 0 1px 3px rgba(29,29,43,.04), 0 1px 2px rgba(29,29,43,.06);
  --shadow-md: 0 4px 12px rgba(29,29,43,.06), 0 2px 4px rgba(29,29,43,.04);
  --shadow-lg: 0 8px 24px rgba(29,29,43,.08), 0 4px 8px rgba(29,29,43,.04);
  --shadow-warm: 0 4px 16px rgba(194,75,43,.1), 0 2px 4px rgba(194,75,43,.05);
  
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;
  
  --ease-out: cubic-bezier(.25,.46,.45,.94);
  --ease-out-quart: cubic-bezier(.165,.84,.44,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color .2s var(--ease-out); }
img { max-width: 100%; display: block; }

/* 全局 focus-visible */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Container ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==================== Header ==================== */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
}

/* Logo — 杂志感衬线体 */
.site-logo {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--c-primary);
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  transition: opacity .2s var(--ease-out);
}
.site-logo:hover { opacity: .8; }

/* 搜索框 — 简洁圆润 */
.header-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-full);
  padding: 0 48px 0 20px;
  font-size: 14px;
  background: var(--c-bg);
  color: var(--c-text);
  outline: none;
  transition: all .25s var(--ease-out);
}
.header-search input::placeholder { color: var(--c-muted); }
.header-search input:focus {
  border-color: var(--c-primary);
  background: var(--c-surface);
  box-shadow: 0 0 0 3px rgba(194,75,43,.08);
}
.header-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 14px;
  transition: background .2s var(--ease-out);
}
.header-search button:hover { background: var(--c-primary-light); }
.header-search button:active { transform: scale(.92); }

/* 主导航 */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-secondary);
  transition: all .2s var(--ease-out);
}
.main-nav a:hover {
  color: var(--c-primary);
  background: var(--c-primary-bg);
}
.main-nav a:active { transform: scale(.96); }

/* ==================== 榜单导航 ==================== */
.sub-nav {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-light);
}
.sub-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-nav-inner::-webkit-scrollbar { display: none; }
.sub-nav a {
  color: var(--c-text-secondary);
  white-space: nowrap;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s var(--ease-out);
  flex-shrink: 0;
}
.sub-nav a:hover {
  color: var(--c-primary);
  background: var(--c-primary-bg);
}
.sub-nav a.active {
  color: #fff;
  background: var(--c-primary);
  font-weight: 600;
}

/* ==================== Main Layout ==================== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 24px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.content-main { min-width: 0; }

/* ==================== 区块标题 ==================== */
.section-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  padding: 14px 20px;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.section-title small {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  color: var(--c-muted);
  font-weight: 400;
}

/* ==================== 商品列表流 ==================== */
.goods-feed { display: flex; flex-direction: column; gap: 12px; }

.feed-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: border-color .25s var(--ease-out),
              box-shadow .25s var(--ease-out),
              transform .25s var(--ease-out);
  position: relative;
}
.feed-card:hover {
  border-color: var(--c-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* 左图 — 圆角，带阴影 */
.feed-img {
  width: 160px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--c-bg);
  box-shadow: var(--shadow-sm);
}
.feed-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease-out);
}
.feed-card:hover .feed-img img { transform: scale(1.05); }

/* 右侧内容 */
.feed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 标题 — 衬线体增加品位 */
.feed-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.feed-card:hover .feed-title { color: var(--c-primary); }
.feed-title a { color: inherit; text-decoration: none; }

/* 标题中红色价格 */
.title-price {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  color: var(--c-primary);
  font-weight: 700;
}

/* 营销文案 */
.feed-desc {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 价格行 */
.feed-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.f-price-now {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.5px;
}
.f-price-now::before {
  content: '¥';
  font-size: 13px;
  font-weight: 700;
}
.f-price-old {
  font-size: 13px;
  color: var(--c-muted);
  text-decoration: line-through;
}

/* 底部元数据 — 人气 + 时间 + 购买按钮 一行 */
.feed-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--c-muted);
  flex-wrap: wrap;
}

/* 人气标签 */
.feed-heat {
  color: var(--c-primary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* X分钟前更新 */
.feed-time {
  color: var(--c-accent);
  font-size: 11px;
  background: var(--c-accent-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 500;
}

/* 购买按钮 */
.feed-buy-area {
  margin-left: auto;
  flex-shrink: 0;
}
.btn-buy-feed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  background: var(--c-primary);
  color: #fff !important;
  border: none;
  padding: 8px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .25s var(--ease-out);
  text-decoration: none !important;
}
.btn-buy-feed:hover {
  background: var(--c-primary-light);
  box-shadow: var(--shadow-warm);
  transform: translateY(-1px);
  color: #fff !important;
}
.btn-buy-feed:active {
  transform: translateY(0) scale(.97);
  transition-duration: 100ms;
}

/* ==================== 右侧边栏 ==================== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-widget {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
}
.widget-header {
  font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  background: var(--c-text);
  color: var(--c-accent);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}
.widget-header .icon { font-size: 16px; }

/* 排行榜 */
.ranking-list { padding: 8px 0; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  transition: background .2s var(--ease-out);
  cursor: pointer;
}
.rank-item:hover { background: var(--c-primary-bg); }
.rank-item:active { background: rgba(194,75,43,.08); }
.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.rank-num.top1 { background: var(--c-primary); color: #fff; }
.rank-num.top2 { background: var(--c-accent); color: #fff; }
.rank-num.top3 { background: #D4976A; color: #fff; }
.rank-num.normal { background: var(--c-bg); color: var(--c-muted); }
.rank-title {
  flex: 1;
  font-size: 13px;
  color: var(--c-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item:hover .rank-title { color: var(--c-primary); }
.rank-hot {
  font-size: 11px;
  color: var(--c-accent);
  font-weight: 600;
  white-space: nowrap;
}

/* 热词云 */
.hot-tags { padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tag {
  display: inline-block;
  padding: 5px 14px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: all .2s var(--ease-out);
}
.hot-tag:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.hot-tag:active { transform: scale(.94); }

/* ==================== 分页 ==================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 32px 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--c-text-secondary);
  transition: all .2s var(--ease-out);
  padding: 0 12px;
}
.pagination a:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-bg);
}
.pagination a:active { transform: scale(.95); }
.pagination .active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  font-weight: 600;
}

/* ==================== 置顶商品区（网格） ==================== */
.pinned-section { margin-bottom: 24px; }
.pinned-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.pinned-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all .3s var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.pinned-card::before {
  content: 'HOT';
  position: absolute;
  top: 12px;
  right: -20px;
  background: var(--c-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 26px;
  transform: rotate(45deg);
  letter-spacing: 1px;
}
.pinned-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-border);
}
.pinned-card .p-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--c-bg);
}
.pinned-card .p-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease-out);
}
.pinned-card:hover .p-img img { transform: scale(1.06); }
.pinned-card .p-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.pinned-card .p-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.p-price-now {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-primary);
}
.p-price-now::before { content: '¥'; font-size: 14px; }
.p-price-old {
  font-size: 12px;
  color: var(--c-muted);
  text-decoration: line-through;
}
.coupon-tag-sm {
  display: inline-block;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.pinned-card .p-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--c-muted);
}
.sales-num { color: var(--c-accent); font-weight: 600; }

/* ==================== 详情页 ==================== */
.detail-page { padding: 24px 0 48px; }
.detail-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 32px;
}

.detail-gallery {
  position: sticky;
  top: 88px;
  align-self: start;
}
.detail-main-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-border-light);
  background: var(--c-bg);
  margin-bottom: 12px;
}
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumb-row { display: flex; gap: 8px; }
.detail-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--c-bg);
  transition: border-color .2s var(--ease-out);
}
.detail-thumb.active,
.detail-thumb:hover { border-color: var(--c-primary); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { }
.detail-info h1 {
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: 20px;
}

.detail-price-box {
  background: linear-gradient(135deg, var(--c-primary-bg), var(--c-accent-bg));
  border: 1px solid rgba(194,75,43,.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.price-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.d-price-now {
  font-size: 36px;
  font-weight: 900;
  color: var(--c-primary);
  letter-spacing: -1px;
}
.d-price-now::before { content: '¥'; font-size: 20px; }
.d-price-old {
  font-size: 15px;
  color: var(--c-muted);
  text-decoration: line-through;
}
.d-coupon-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.coupon-value-tag {
  display: inline-block;
  background: var(--c-primary);
  color: #fff;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
}
.d-commission-tip {
  color: var(--c-success);
  font-weight: 600;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 13px;
}
.meta-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text-secondary);
}
.meta-label { color: var(--c-muted); }
.meta-value { color: var(--c-text); font-weight: 500; }

/* 购买按钮区 */
.buy-action-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}
.btn-buy-big {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s var(--ease-out);
  box-shadow: var(--shadow-warm);
}
.btn-buy-big:hover {
  background: var(--c-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(194,75,43,.2);
}
.btn-buy-big:active {
  transform: translateY(0) scale(.98);
  transition-duration: 100ms;
}
.btn-copy-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 24px;
  background: var(--c-surface);
  border: 2px solid var(--c-primary);
  border-radius: var(--radius-full);
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease-out);
  white-space: nowrap;
}
.btn-copy-link:hover { background: var(--c-primary-bg); }

.detail-desc {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.detail-desc h3 {
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border-light);
}
.detail-desc img { max-width: 100%; border-radius: var(--radius); margin: 8px 0; }

/* ==================== Footer ==================== */
.site-footer {
  background: var(--c-text);
  color: rgba(255,255,255,.5);
  padding: 36px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-links { margin-bottom: 16px; }
.footer-links a { color: rgba(255,255,255,.6); margin: 0 16px; transition: color .2s; }
.footer-links a:hover { color: var(--c-accent); }
.footer-text p { margin: 4px 0; }

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--c-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state .btn-reload {
  margin-top: 16px;
  padding: 10px 28px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s var(--ease-out);
}
.empty-state .btn-reload:hover {
  background: var(--c-primary-light);
  transform: translateY(-1px);
}
.empty-state .btn-reload:active { transform: scale(.96); }

/* ==================== 加载动画 ==================== */
.loading-skeleton {
  background: linear-gradient(90deg, var(--c-border-light) 25%, var(--c-bg) 50%, var(--c-border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s var(--ease-out) infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==================== 入场动画 ==================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-card {
  animation: fadeInUp .35s var(--ease-out-quart) both;
}

/* 30个卡片逐个延迟入场（30ms递增） */
.feed-card:nth-child(1)  { animation-delay: 0ms; }
.feed-card:nth-child(2)  { animation-delay: 30ms; }
.feed-card:nth-child(3)  { animation-delay: 60ms; }
.feed-card:nth-child(4)  { animation-delay: 90ms; }
.feed-card:nth-child(5)  { animation-delay: 120ms; }
.feed-card:nth-child(6)  { animation-delay: 150ms; }
.feed-card:nth-child(7)  { animation-delay: 180ms; }
.feed-card:nth-child(8)  { animation-delay: 210ms; }
.feed-card:nth-child(9)  { animation-delay: 240ms; }
.feed-card:nth-child(10) { animation-delay: 270ms; }
.feed-card:nth-child(11) { animation-delay: 300ms; }
.feed-card:nth-child(12) { animation-delay: 330ms; }
.feed-card:nth-child(13) { animation-delay: 360ms; }
.feed-card:nth-child(14) { animation-delay: 390ms; }
.feed-card:nth-child(15) { animation-delay: 420ms; }
.feed-card:nth-child(16) { animation-delay: 450ms; }
.feed-card:nth-child(17) { animation-delay: 480ms; }
.feed-card:nth-child(18) { animation-delay: 510ms; }
.feed-card:nth-child(19) { animation-delay: 540ms; }
.feed-card:nth-child(20) { animation-delay: 570ms; }
.feed-card:nth-child(n+21) { animation-delay: 600ms; }

.sidebar-widget {
  animation: fadeInUp .5s var(--ease-out-quart) both;
}
.sidebar-widget:nth-child(2) { animation-delay: 200ms; }

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .feed-card,
  .sidebar-widget,
  .pinned-card { animation: none !important; }
  * { transition-duration: 0s !important; }
}

/* ==================== 响应式 ==================== */
@media (max-width: 992px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { order: 1; }
  .pinned-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-container { grid-template-columns: 1fr; }
  .detail-gallery { position: static; }
  .main-nav { display: none; }
  .header-search { max-width: 280px; }
  /* 平板端侧边栏：只显示前8条排行 */
  .rank-item:nth-child(n+9) { display: none; }
}
@media (max-width: 600px) {
  .header-inner { gap: 12px; height: 56px; }
  .site-logo { font-size: 18px; }
  .header-search { max-width: 200px; }
  .pinned-grid { grid-template-columns: 1fr; }
  .feed-card {
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }
  .feed-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  /* 移动端 feed-footer: 购买按钮独立一行 */
  .feed-footer {
    gap: 8px;
  }
  .feed-buy-area {
    margin-left: 0;
    width: 100%;
  }
  .btn-buy-feed {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .buy-action-bar { flex-direction: column; }
  .detail-meta-grid { grid-template-columns: 1fr; }
  .sub-nav-inner { gap: 8px; }
  .section-title { font-size: 16px; padding: 12px 16px; }
  /* 手机端侧边栏：紧凑排列，只显示前5条 */
  .sidebar { order: 1; }
  .sidebar-widget { border-radius: var(--radius); }
  .widget-header { padding: 10px 14px; font-size: 13px; }
  .rank-item { padding: 8px 14px; }
  .rank-item:nth-child(n+6) { display: none; }
  .hot-tags { padding: 12px 14px; }
  .hot-tag { padding: 4px 10px; font-size: 11px; }
  .ranking-list { padding: 4px 0; }
}

/* ==================== 分类页导航下拉 ==================== */
.nav-dropdown { position: relative; }
.nav-dropdown .drop-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown .drop-btn::after {
  content: '';
  display: inline-block;
  border: 4px solid transparent;
  border-top-color: currentColor;
  margin-top: 4px;
}
.nav-dropdown:hover .drop-menu { display: block; }
.drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  padding: 8px 0;
  z-index: 100;
}
.drop-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--c-text-secondary);
  font-weight: normal;
}
.drop-menu a:hover {
  background: var(--c-primary-bg);
  color: var(--c-primary);
}

/* ==================== 管理员相关 ==================== */
/* (login page, admin page use inline styles) */

/* ==================== 工具类 ==================== */
.text-red { color: var(--c-primary); }
.text-orange { color: var(--c-accent); }
.text-green { color: var(--c-success); }
.text-gray { color: var(--c-muted); }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
