/* ── CSS 颜色变量（默认值，由 JS 从 localStorage 覆盖） ── */
:root {
  --c-nav-bg:      #2c3e50;
  --c-nav-text:    #ffffff;
  --c-accent:      #2c3e50;
  --c-page-bg:     #ffffff;
  --c-card-bg:     #ffffff;
  --c-text:        #222222;
  --c-tag-badge:   #2c3e50;
}

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

body {
  background: var(--c-page-bg);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

nav {
  background: var(--c-nav-bg);
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 36px;
  gap: 36px;
}

nav .logo {
  height: 42px;
  width: auto;
  display: block;
  margin-right: 12px;
  cursor: pointer;
}

nav .site-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-nav-text);
  letter-spacing: 2px;
  cursor: pointer;
  margin-right: 12px;
  white-space: nowrap;
  user-select: none;
}

nav a {
  color: var(--c-nav-text);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  opacity: 0.85;
  transition: opacity 0.15s;
  cursor: pointer;
}

nav a:hover { opacity: 1; }
nav a.active { opacity: 1; font-weight: 600; }


main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 40px;
  gap: 8px;
}

#section-Featured {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.featured {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.featured .bg {
  width: 100%;
  height: 100%;
  background: #c8d8e8;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 55%);
  pointer-events: none;
}

.card-title {
  position: absolute;
  bottom: 14px;
  left: 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.sub-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.sub-card {
  position: relative;
  flex: 1;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
}

.sub-card:nth-child(1) .bg { background: #b8cfe0; }
.sub-card:nth-child(2) .bg { background: #b8d4c4; }
.sub-card:nth-child(3) .bg { background: #d4c4b0; }

.sub-card .bg { width: 100%; height: 100%; object-fit: cover; }

.sub-card .card-title {
  font-size: 12px;
  font-weight: 500;
  bottom: 9px;
  left: 10px;
}

.content-section {
  display: none;
  width: 100%;
  max-width: 860px;
  flex-direction: column;
  gap: 12px;
}

.content-section.active { display: flex; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
  border-bottom: 1px solid #f0f0f0;
}

.filter-btn {
  padding: 5px 14px;
  font-size: 13px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: var(--c-card-bg);
  color: #555;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.filter-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }

.filter-btn.active {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bcard {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 6px;
  padding: 8px;
  transition: background 0.12s;
  background: var(--c-card-bg);
}

.bcard:hover { filter: brightness(0.97); }

.bcard-thumb {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  overflow: hidden;
  background: #dde6ee;
  position: relative;
}

.bcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.bcard-thumb img.show { display: block; }

.bcard-tag {
  position: absolute;
  top: 5px;
  left: 6px;
  background: var(--c-tag-badge);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0.9;
}

.bcard-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.bcard-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bcard-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-tip {
  grid-column: 1 / -1;
  text-align: center;
  color: #bbb;
  font-size: 13px;
  padding: 32px 0;
}


#section-Join {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.join-card {
  background: var(--c-card-bg);
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 40px 48px;
}

.join-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-email-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.join-email-label {
  font-size: 13px;
  color: #888;
}

.join-email-link {
  font-size: 13px;
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px solid #ccc;
  transition: color 0.15s, border-color 0.15s;
}

.join-email-link:hover {
  color: #2c7be5;
  border-color: #2c7be5;
}

.join-intro-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 1px;
}

.join-intro-body {
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.85;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  color: #aaa;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.join-intro-body.placeholder {
  color: #bbb;
  font-style: italic;
}

@media (max-width: 600px) {
  .join-card { padding: 28px 20px; }
}

/* ── 灯箱 ── */
.lb-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lb-mask.show { display: flex; }

.lb-box {
  position: relative;
  background: var(--c-card-bg);
  border-radius: 10px;
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.lb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--c-text);
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  z-index: 1;
  padding: 4px 6px;
}

.lb-close:hover { opacity: 1; }

.lb-img-wrap {
  width: 100%;
  background: #111;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.lb-meta {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-title { font-size: 16px; font-weight: 600; color: var(--c-text); line-height: 1.4; }
.lb-tags  { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-tag   { background: var(--c-tag-badge); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; opacity: 0.9; }
.lb-desc  { font-size: 13px; color: #888; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 600px) {
  .lb-box { max-height: 96vh; border-radius: 8px; }
  .lb-img-wrap img { max-height: 55vh; }
  .lb-meta { padding: 12px 14px 16px; }
}
