/* ============================================
   搜遇酷图 — 标签列表页静态样式
   用于 /tag/{name}.html 静态页面
   ============================================ */

/* ============================================
   1. Page Variables（与 static-common.css 互补）
   ============================================ */
:root {
  --accent: #6D28D9;
  --accent-soft: #8B5CF6;
  --accent-bg: rgba(109, 40, 217, 0.06);
  --accent-bg-hover: rgba(109, 40, 217, 0.09);
  --r: 16px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 32px rgba(0, 0, 0, 0.08);
}

/* ============================================
   2. Main Layout
   ============================================ */
.main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ============================================
   3. Tag Hero
   ============================================ */
.tag-hero {
  text-align: center;
  margin-bottom: 48px;
  animation: fu 0.5s ease both;
}

.tag-hero .tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.tag-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  text-wrap: balance;
}

.tag-hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.tag-hero .tag-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tag-hero .tag-stats strong {
  color: var(--text);
  font-weight: 700;
}

.tag-intro {
  max-width: 680px;
  margin: 16px auto 0;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.85;
  text-wrap: balance;
}

/* ============================================
   4. AI Intro Content Card
   ============================================ */
.tag-content {
  margin-bottom: 40px;
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  animation: fu 0.5s ease 0.06s both;
}

.tag-content h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-bg);
}

.tag-article p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-sub);
  margin: 0 0 12px;
}

.tag-article p:last-child {
  margin-bottom: 0;
}

/* ============================================
   5. Post Cards Grid
   ============================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  animation: fu 0.5s ease 0.12s both;
}

.pcard {
  background: var(--surface);
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: all 0.25s;
}

.pcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(109, 40, 217, 0.2);
}

.pcard a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.pc-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f0efeb;
}

.pc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.pcard:hover .pc-img img {
  transform: scale(1.04);
}

.pc-body {
  padding: 12px 14px;
}

.pc-tt {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-like {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: #c2410c;
  font-weight: 600;
}

/* ============================================
   6. Related Tags Cloud（作品列表下方）
   ============================================ */
.tag-cloud-section {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  animation: fu 0.5s ease 0.16s both;
}

.tc-tt {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-bg);
}

.tc-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tc-group:last-child {
  margin-bottom: 0;
}

.tc-dim {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 6px;
  min-width: 40px;
}

.tc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tpill {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-sub);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  transition: all 0.2s;
}

.tpill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg-hover);
  transform: translateY(-1px);
}

.tpill.tact {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

/* ============================================
   7. Pagination
   ============================================ */
.pg {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
}

.pg-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.pg-btn:hover {
  background: #5B21B6;
  color: #fff;
  transform: translateY(-1px);
}

.pg-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   8. Empty State
   ============================================ */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

.empty a {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   9. Section Divider
   ============================================ */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent-bg);
  border-radius: 2px;
  margin: 0 auto 32px;
}

/* ============================================
   10. Animations
   ============================================ */
@keyframes fu {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tag-hero,
  .tag-cloud-section,
  .tag-content,
  .grid {
    animation: none;
  }
}

/* ============================================
   11. Responsive
   ============================================ */
@media (max-width: 768px) {
  .main {
    padding: 20px 16px 48px;
  }
  .tag-hero {
    margin-bottom: 36px;
  }
  .tag-hero h1 {
    font-size: 22px;
  }
  .tag-stats {
    gap: 16px;
    font-size: 13px;
  }
  .tag-content,
  .tag-cloud-section {
    padding: 20px;
    border-radius: var(--r-sm);
  }
  .tag-cloud-section {
    margin-top: 36px;
  }
  .tc-tt {
    font-size: 15px;
  }
  .tc-dim {
    min-width: 32px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .tag-hero {
    margin-bottom: 28px;
  }
  .tag-hero h1 {
    font-size: 20px;
  }
  .tag-intro {
    font-size: 13px;
  }
  .tag-content,
  .tag-cloud-section {
    padding: 16px;
  }
  .tag-content h2 {
    font-size: 16px;
  }
  .tag-article p {
    font-size: 13px;
  }
  .tag-cloud-section {
    margin-top: 32px;
  }
  .tpill {
    padding: 4px 10px;
    font-size: 11.5px;
  }
  .pg {
    margin-top: 32px;
  }
}
