:root {
  --bg: #f5f5f5;
  --bg-soft: #eeeeee;
  --surface: #ffffff;
  --border: #e5e5e5;
  --text: #222222;
  --text-soft: #555555;
  --muted: #888888;
  --primary: #e74c3c;
  --primary-dark: #c0392b;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --maxw: 1200px;
  --header-h: 70px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 15px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  height: var(--header-h);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand .logo {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

.brand-domain {
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.nav a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-soft);
  border-radius: var(--radius);
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.header-search {
  position: relative;
  flex-shrink: 0;
}

.header-search input {
  width: 180px;
  height: 34px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: #fafafa;
  outline: none;
}

.header-search input:focus {
  border-color: var(--primary);
  background: #fff;
}

.header-search button {
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search button:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  font-size: 22px;
  color: var(--text);
}

/* ---------- Banner ---------- */
.banner {
  display: block;
  line-height: 0;
  overflow: hidden;
}
.banner-link {
  display: block;
  cursor: pointer;
}
.banner-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Category cards ---------- */
.category-section {
  padding: 20px 0 10px;
}

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

.category-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  border-radius: var(--radius);
  color: #ffd54f;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, opacity .15s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  opacity: .95;
  color: #ffecb3;
}

.category-card.c0 { background: linear-gradient(135deg, #5d1a1a, #8b2f2f); }
.category-card.c1 { background: linear-gradient(135deg, #1a237e, #283593); }
.category-card.c2 { background: linear-gradient(135deg, #1b5e20, #2e7d32); }
.category-card.c3 { background: linear-gradient(135deg, #4e342e, #6d4c41); }
.category-card.c4 { background: linear-gradient(135deg, #311b92, #512da8); }
.category-card.c5 { background: linear-gradient(135deg, #006064, #00838f); }
.category-card.c6 { background: linear-gradient(135deg, #bf360c, #d84315); }
.category-card.c7 { background: linear-gradient(135deg, #3e2723, #5d4037); }

/* ---------- Section title ---------- */
.section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0 16px;
}

.section-title .accent {
  width: 4px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 4px;
}

.section-title .text h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.section-title .text h2 strong {
  color: var(--primary);
  font-weight: 700;
}

.section-title .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Filters (chips) ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  transition: all .15s ease;
}

.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Gallery grid ---------- */
.gallery-section {
  padding-bottom: 30px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }

.card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .3s ease;
}

.card:hover .thumb img { transform: scale(1.05); }

.card .info {
  padding: 10px 12px 12px;
}

.card .info h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.card .meta .views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 80px 0;
  grid-column: 1 / -1;
}

/* ---------- Pagination ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
}
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: 13px;
  background: #fff;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .current { background: #333; color: #fff; border-color: #333; }
.pager .pager-edge { padding: 0 12px; }
.pager .pager-edge.disabled {
  color: #bbb;
  cursor: default;
}
.pager .pager-edge.disabled:hover {
  border-color: var(--border);
  color: #bbb;
}
.pager .pager-dots {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  cursor: default;
  min-width: auto;
  padding: 0 4px;
}
.pager .pager-counter {
  color: var(--text);
  font-weight: 500;
  min-width: auto;
  padding: 0 10px;
}

/* ---------- Load more ---------- */
.load-more { text-align: center; margin: 32px 0 10px; }
.load-more .btn {
  display: inline-block;
  padding: 12px 40px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 15px;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.load-more .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0 10px;
}
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }
.breadcrumb .current { color: var(--text); }

/* ---------- Detail ---------- */
.detail { padding: 0 0 80px; }

/* Hero two-column: video + reminder */
.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 30px;
}

/* Video frame (dark matte, no native controls) */
.detail-video {
  position: relative;
  background: #161616;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.detail-video video,
.detail-video-fallback img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Right-side reminder panel (fixed copy) */
.detail-reminder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.reminder-box {
  background: linear-gradient(180deg, #ffffff, #fcfcfc);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  flex: 1;
}
.reminder-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.reminder-title::before {
  content: "";
  width: 6px;
  height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
  flex-shrink: 0;
}
.reminder-list {
  margin: 0;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 2.1;
}
.reminder-list li { padding-left: 4px; }
.reminder-list li::marker { color: var(--primary); font-weight: 700; }
.reminder-special {
  background: linear-gradient(180deg, #fff5f5, #ffecec);
  border: 1px solid #ffd6d6;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  color: #8a1f1f;
  line-height: 1.8;
  box-shadow: 0 6px 18px rgba(220, 60, 60, .08);
}
.reminder-special strong { color: var(--primary-dark); }

/* Title + big image showcase card */
.detail-showcase {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .10);
  overflow: hidden;
  margin-bottom: 34px;
}

/* Title bar: gradient background, white larger title */
.detail-titlebar {
  position: relative;
  text-align: center;
  padding: 30px 24px 26px;
  background: linear-gradient(90deg, #d94848 0%, #c03939 45%, #b22f2f 100%);
}
.detail-titlebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .18), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(0, 0, 0, .08), transparent 40%);
  pointer-events: none;
}
.detail-titlebar h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  line-height: 1.25;
}

/* Big image inside the showcase card */
.detail-bigimg-wrap {
  text-align: center;
  padding: 30px 24px 36px;
  background: #fff;
}
.detail-bigimg {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  cursor: zoom-in;
  transition: transform .4s ease, box-shadow .4s ease;
}
.detail-bigimg:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .12);
}

/* Subtle entrance animation */
@keyframes detailFade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.detail-grid,
.detail-showcase {
  animation: detailFade .55s ease both;
}
.detail-showcase { animation-delay: .06s; }

/* Related grid */
.related-section { margin-top: 30px; }
.related-section .section-title { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 30px 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-soft);
  padding: 0 6px;
}

.footer-links a:hover { color: var(--primary); }

.footer-links .sep { color: var(--border); }

.site-footer .copyright {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer .copyright a { color: var(--primary); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,12,16,.85);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 8px; }
.lightbox .close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 34px; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 820px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .header-search input { width: 140px; }
  .nav a { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 640px) {
  .site-header { height: auto; }
  .site-header .container { flex-wrap: wrap; padding: 10px 15px; }
  .brand { order: 1; }
  .nav-toggle { order: 2; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .header-search { order: 3; width: 100%; margin-top: 10px; }
  .header-search input { width: 100%; }
  .nav {
    order: 4;
    position: static;
    width: 100%;
    background: #fff;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 0 12px;
    display: none;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text-soft); }
  .nav a:last-child { border-bottom: none; }

  .banner-img { /* 移动端图片自适应宽度，不固定高度 */ }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-card { height: 60px; font-size: 15px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .info { padding: 8px; }
  .card .info h3 { font-size: 13px; height: 36px; }
  .card .meta { font-size: 11px; }
}

/* ===== 在线客服悬浮按钮 + 弹出面板 ===== */
.cs-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 9px;
  background: linear-gradient(160deg, #ff7a7a, #e84545 55%, #c53030);
  color: #fff;
  border-radius: 14px 0 0 14px;
  cursor: pointer;
  user-select: none;
  transition: transform .25s ease;
}
.cs-tab:hover { transform: translateY(-50%) translateX(-4px); }
.cs-tab.hidden { opacity: 0; visibility: hidden; transform: translateY(-50%) translateX(24px); pointer-events: none; }
.cs-tab-icon { font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.cs-tab-text { font-size: 13px; font-weight: 600; writing-mode: vertical-rl; letter-spacing: 3px; }

.cs-panel {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(24px);
  z-index: 96;
  width: 192px;
  background: #f5f6f8;
  border-radius: 16px;
  box-shadow: 0 16px 50px rgba(20,25,35,.28);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, transform .28s cubic-bezier(.22,.61,.36,1), visibility .28s;
}
.cs-panel.open { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }

.cs-panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  background: #2f3640;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background .2s ease;
}
.cs-panel-head:hover { background: #3a414c; }
.cs-collapse-arrow { font-size: 16px; line-height: 1; opacity: .9; transition: transform .2s ease; }
.cs-panel-head:hover .cs-collapse-arrow { transform: translateX(-2px); }

.cs-panel-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.cs-block {
  background: #fff;
  border-radius: 14px;
  padding: 14px 12px 16px;
  text-align: center;
  border: 1px solid #eef0f3;
}
.cs-block-title {
  position: relative;
  font-size: 13.5px;
  font-weight: 700;
  color: #2b3138;
  margin-bottom: 11px;
  letter-spacing: .5px;
}
.cs-block-title::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.cs-block--qq .cs-block-title::before { background: #12b7f5; }
.cs-block--wx .cs-block-title::before { background: #1aad19; }

.cs-qr {
  width: 118px;
  height: 118px;
  margin: 0 auto 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eceef1;
}
.cs-qr img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cs-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.cs-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.cs-btn-qq { background: #1aad19; margin-bottom: 10px; }
.cs-btn-qq:hover { filter: brightness(1.08); transform: none; color: #fff; }
.cs-id {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7280;
  background: #f1f3f6;
  border-radius: 20px;
  padding: 5px 14px;
}
.cs-id::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1aad19; }

.cs-btn-bottom {
  display: block;
  background: #2f3640;
  border-radius: 0;
  padding: 13px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: default;
  letter-spacing: 1px;
}
.cs-btn-bottom:hover { background: #3a414c; }

@media (max-width: 640px) {
  .cs-panel { right: 0; width: 172px; }
  .cs-tab-text { font-size: 12px; }
}
