:root {
  --primary: #DE7B3A;
  --primary-dark: #B85E25;
  --primary-soft: #FBEAD9;
  --accent: #F0A04B;
  --tag: #DE7B3A;
  --text: #3A2E25;
  --muted: #8A7B6B;
  --muted-2: #6B5D4F;
  --line: #ECE3D5;
  --bg: #FBF6EE;
  --surface: #FFFDF9;
  --bg-soft: #F5ECDD;
  --grad: linear-gradient(135deg, #E8934F, #D97742);
  --logo-1: #E07B39; --logo-2: #D97742; --logo-3: #F0A04B; --logo-4: #C2612A; --logo-5: #E8A85C;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "PingFangSC", Arial, "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; }

/* ---------- header ---------- */
.header-container { background: var(--surface); }
.header-container .header { box-shadow: 0 1px 0 0 var(--line); max-width: 1200px; margin: 0 auto 30px; }
.header-top { background: var(--bg-soft); padding: 12px 20px; }
.header-top .logo { display: inline-block; font-size: 34px; font-weight: 800; color: var(--primary); letter-spacing: 1px; line-height: 50px; }
.header-top .logo .l1 { color: var(--logo-1); }
.header-top .logo .l2 { color: var(--logo-2); }
.header-top .logo .l3 { color: var(--logo-3); }
.header-top .logo .l4 { color: var(--logo-4); }
.header-top .logo .l5 { color: var(--logo-5); }

.header-bottom { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; position: relative; }
.header-bottom ul { display: flex; list-style: none; align-items: center; }
.header-bottom ul a {
  display: block; padding: 7px 0; margin-right: 18px;
  font-size: 18px; color: var(--text); position: relative;
}
.header-bottom ul a:hover { color: var(--primary); }
.header-bottom ul a.active { color: var(--primary); }
.header-bottom ul a.active::after {
  content: ""; display: block; width: 95%; height: 2px;
  position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
}
.header-bottom .menu { display: none; font-size: 26px; cursor: pointer; color: var(--text); }

.head-bottom-search {
  background: var(--surface); border-radius: 2px; border: 1px solid var(--line);
  height: 38px; display: flex; align-items: center; padding: 0 12px; width: 260px; flex-shrink: 0;
}
.head-bottom-search input {
  border: 0; background: transparent; outline: none; flex: 1; font-size: 14px; color: var(--text);
}
.head-bottom-search .s-icon { color: var(--muted); display: flex; }

/* ---------- layout width ---------- */
.width { max-width: 1200px; margin: 0 auto; padding: 0 10px; }

/* ---------- first row ---------- */
.first-row { display: flex; justify-content: space-between; }
.first-row .first-row-left { width: 330px; flex-shrink: 0; margin-right: 30px; }
.first-row .first-row-right { flex-grow: 1; min-width: 0; }

.info-title {
  font-size: 22px; color: var(--text); line-height: 26px;
  border-bottom: 3px solid var(--line); position: relative; padding-bottom: 10px; margin-bottom: 18px;
}
.info-title::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 60px; height: 3px; background: var(--primary);
}

.first-row-left-content { margin-top: 4px; }
.first-row-left-content .first-row-left-item {
  display: flex; margin-bottom: 16px; cursor: pointer;
}
.first-row-left-content .first-row-left-item:last-child { margin-bottom: 0; }
.first-row-left-content .first-row-left-item img {
  width: 90px; height: 90px; flex-shrink: 0; object-fit: cover; border-radius: 4px; background: #EFE7DB;
}
.first-row-left-content .first-row-left-item .first-row-left-item-info { padding-left: 14px; box-sizing: border-box; min-width: 0; }
.first-row-left-content .first-row-left-item .first-row-left-item-info h3 {
  font-weight: 600; font-size: 15px; color: var(--text); line-height: 22px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fl-author { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.fl-author svg { width: 12px; height: 12px; flex-shrink: 0; }
.first-row-left-content .first-row-left-item:hover .first-row-left-item-info h3 { text-decoration: underline; }

/* right: current picks — big left (full height) + 4 small 2x2 right */
.first-row-right-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2px; }
.first-row-right-block { position: relative; display: block; overflow: hidden; border-radius: 4px; background: #1f2937; }
.first-row-right-block.pick-big { grid-column: 1; grid-row: 1 / 3; aspect-ratio: 1 / 1; }
.first-row-right-block.pick-small { aspect-ratio: 1 / 1; }
.first-row-right-block img {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.82);
}
.first-row-right-block:hover img { filter: brightness(.92); }
.first-row-right-block .info-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-size: 13px; line-height: 1; font-weight: 500; color: #fff;
  background: var(--grad); padding: 8px 11px; border-radius: 6px; box-shadow: 0 2px 8px rgba(14,165,233,.35);
}
.info-block { position: absolute; bottom: 0; left: 0; width: 100%; box-sizing: border-box; padding: 18px; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0)); }
.info-block h3 { font-weight: 700; font-size: 24px; color: #fff; line-height: 32px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pick-author { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; }
.pick-author svg { width: 14px; height: 14px; flex-shrink: 0; }
.pick-author .sep, .fl-author .sep { opacity: .75; margin: 0 2px; }
.first-row-right-block.pick-small .info-block { padding: 14px; }
.first-row-right-block.pick-small .info-block h3 { font-size: 15px; line-height: 22px; -webkit-line-clamp: 3; }
.first-row-right-block.pick-small .pick-author { font-size: 12px; margin-top: 8px; }

/* ---------- second row grid ---------- */
.second-row-left-list { margin-top: 4px; display: flex; flex-wrap: wrap; }
.second-row-left-list .second-row-left-item {
  margin-bottom: 26px; width: calc(100%/3 - 14px); margin-right: 20px; display: block;
}
.second-row-left-list .second-row-left-item:nth-child(3n) { margin-right: 0; }
.second-row-left-list .second-row-left-item .second-row-left-item-img {
  width: 100%; padding-bottom: 60%; position: relative; overflow: hidden; border-radius: 4px; background: #EFE7DB;
}
.second-row-left-list .second-row-left-item .second-row-left-item-img img { width: 100%; height: 100%; position: absolute; top: 0; left: 0; object-fit: cover; }
.second-row-left-list .second-row-left-item .second-row-left-item-img .info-tag {
  position: absolute; top: 12px; left: 12px; font-size: 12px; color: #fff; background: var(--grad); padding: 3px 8px; border-radius: 4px;
}
.second-row-left-list .second-row-left-item .second-row-left-item-info h3 {
  margin-top: 14px; font-weight: 600; font-size: 16px; color: var(--text); line-height: 24px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.second-row-left-list .second-row-left-item .second-row-left-item-info p { margin-top: 10px; font-size: 12px; color: var(--muted); }
.second-row-left-list .second-row-left-item .second-row-left-item-info div {
  margin-top: 10px; font-size: 13px; color: var(--muted-2); line-height: 21px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.second-row-left-list .second-row-left-item:hover .second-row-left-item-info h3 { text-decoration: underline; }

/* second row two-column split */
.second-row { display: flex; justify-content: space-between; margin-top: 55px; }
.second-row .second-row-left { width: 65%; }
.second-row .second-row-left.second-row-left-full-screen { width: 100%; }
.second-row .second-row-right { width: 33%; }
/* Top Updates list uses larger thumbs */
.second-row-right .first-row-left-content .first-row-left-item img { width: 171px; height: 102px; }

/* ---------- empty / load more ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { font-size: 18px; color: var(--text); margin-bottom: 6px; }
.load-more {
  display: block; margin: 10px auto 30px; padding: 11px 34px; border: 1px solid var(--primary);
  border-radius: 4px; background: #fff; color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.load-more:hover { background: var(--primary); color: #fff; }

/* ---------- ad container ---------- */
.ad-container { margin: 24px 0; text-align: center; }
.adbox { width: 300px; height: 250px; margin: 0 auto; position: relative; }
.ad-slot { width: 100%; height: 100%; }
.ad-slot:empty::after {
  content: "AD"; display: grid; place-items: center; width: 100%; height: 100%;
  color: #b3b8c0; font-size: 13px; font-weight: 700; letter-spacing: 2px;
}
.ad-close {
  position: absolute; top: -10px; right: 4px; z-index: 2; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: #fff; color: #333; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.ad-anchor { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; z-index: 1200; padding: 0 8px; }
.ad-anchor .adbox { margin: 0; width: 100%; max-width: 320px; height: 50px; }
.ad-interstitial { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 16px; }
.ad-interstitial.show { display: flex; }
.ad-interstitial-inner { position: relative; }
.ad-interstitial .adbox { margin: 0; }

/* ---------- detail ---------- */
.detail-content { max-width: 860px; margin: 0 auto; padding: 0 10px 40px; }
.detail-hero { width: 100%; height: 320px; object-fit: cover; border-radius: 8px; background: #eee; }
.detail-content .text_title { font-size: 28px; line-height: 38px; color: var(--text); margin: 22px 0 10px; font-weight: 700; }
.detail-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.detail-meta .cat { background: var(--primary-soft); color: var(--primary-dark); padding: 3px 10px; border-radius: 4px; font-weight: 600; }
.detail-body p { font-size: 16.5px; line-height: 1.9; color: #4A3F36; margin: 16px 0; }
.detail-body h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 30px 0 6px; }

.related-title { font-size: 22px; color: var(--text); border-bottom: 3px solid var(--line); position: relative; padding-bottom: 10px; margin: 40px 0 20px; }
.related-title::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 60px; height: 3px; background: var(--primary); }

/* ---------- static pages ---------- */
.page { max-width: 820px; margin: 24px auto 40px; padding: 30px 24px; }
.page h1 { font-size: 26px; margin-bottom: 6px; color: var(--text); }
.page h2 { font-size: 18px; margin: 22px 0 6px; color: var(--text); }
.page p, .page li { font-size: 15px; line-height: 1.9; color: #4A3F36; }
.page ul { padding-left: 20px; }
.page .updated { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.page a { color: var(--primary); font-weight: 600; }

/* ---------- footer ---------- */
.footer-container { background: #2A2018; padding: 50px 0; display: flex; flex-direction: column; align-items: center; color: #E8DDD0; padding-bottom: 80px; margin-top: 20px; border-top: 1px solid var(--line); }
.footer-container .footer-links { display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.footer-container .footer-links a { color: #D9C7B0; text-decoration: underline; font-size: 13px; margin: 0 16px; }
.footer-container .footer-copy { color: #A8917A; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .first-row { display: block; }
  .first-row .first-row-left { width: 100%; margin-right: 0; }
  .first-row .first-row-right { width: 100%; margin-top: 35px; }
  .second-row { display: block; }
  .second-row .second-row-left { width: 100%; }
  .second-row .second-row-right { width: 100%; margin-top: 35px; }
  .second-row-left-list .second-row-left-item { width: calc(50% - 10px); margin-right: 20px; }
  .second-row-left-list .second-row-left-item:nth-child(3n) { margin-right: 20px; }
  .second-row-left-list .second-row-left-item:nth-child(2n) { margin-right: 0; }
  /* Current Picks: 大图整宽在上, 小图 2x2 在下 */
  .first-row-right-content { grid-template-columns: 1fr 1fr; gap: 4px; }
  .first-row-right-block.pick-big { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 16 / 9; }
  .first-row-right-block.pick-small { aspect-ratio: 1 / 1; }
}
@media (max-width: 768px) {
  .header-bottom .menu { display: block; margin-left: auto; }
  .header-bottom ul {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface);
    flex-direction: column; padding: 10px 20px; box-shadow: 0 6px 16px rgba(0,0,0,.4); z-index: 100;
  }
  .header-bottom ul.show { display: flex; }
  .header-bottom ul a { margin: 6px 0; }
  .head-bottom-search { width: 200px; }
  .first-row-left-content .first-row-left-item img { width: 72px; height: 72px; }
  .detail-hero { height: 200px; }
  .detail-content .text_title { font-size: 23px; line-height: 32px; }
}
@media (max-width: 560px) {
  .second-row-left-list .second-row-left-item { width: 100%; margin-right: 0; }
  .second-row-left-list .second-row-left-item:nth-child(3n) { margin-right: 0; }
  .head-bottom-search { display: none; }
  /* Current Picks: 全部单列竖排 */
  .first-row-right-content { grid-template-columns: 1fr; }
  .first-row-right-block.pick-big { grid-column: auto; aspect-ratio: 16 / 9; }
  .first-row-right-block.pick-small { aspect-ratio: 16 / 9; }
}

/* ---------- floating back-to-home (detail only) ---------- */
.fab-home {
  position: fixed; right: 22px; bottom: 70px; z-index: 1100;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 22px rgba(34,211,238,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fab-home:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(34,211,238,.5); }
.fab-home svg { width: 24px; height: 24px; }
@media (max-width: 768px) { .fab-home { right: 16px; bottom: 64px; } }
