/* ============================================================
   首页样式 - 老诗集
   依赖 poem-detail.css 的变量
   ============================================================ */

/* ========== Hero ========== */
.hero {
  padding: 60px 0 50px;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(107, 123, 140, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(107, 123, 140, 0.04) 0%, transparent 60%);
}

html.dark .hero {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(154, 171, 184, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(154, 171, 184, 0.05) 0%, transparent 60%);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 10px;
  margin: 0 0 14px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  letter-spacing: 3px;
  margin: 0 0 20px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 34px;
  line-height: 1.9;
  padding: 0 20px;
}

/* 搜索框 */
.hero-search {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4px 6px 4px 22px;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md);
}

.hero-search .search-icon {
  color: var(--text-muted);
  font-size: 15px;
  flex-shrink: 0;
  margin-right: 12px;
}

.hero-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: var(--text);
  font-family: var(--font-sans);
  padding: 11px 0;
  min-width: 0;
}

.hero-search input::placeholder {
  color: var(--text-muted);
}

.hero-search button {
  padding: 10px 26px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.hero-search button:hover {
  background: var(--accent-hover);
}

/* 统计数字 */
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-light);
  max-width: 720px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 20px;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  line-height: 1;
}

.stat-num sup {
  font-size: 0.9rem;
  color: var(--accent);
  opacity: 0.7;
  margin-left: 2px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ========== 通用 Section ========== */
.section {
  padding: 52px 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-bright);
  text-align: center;
  letter-spacing: 4px;
  margin: 0 0 8px;
}

.section-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin: 0 0 36px;
}

.section-more {
  text-align: center;
  margin-top: 32px;
}

.section-more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.section-more a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.section-more i {
  font-size: 11px;
}

/* ========== 网站简介 ========== */
.intro-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 14px;
  line-height: 2.2;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* ========== 四大入口 ========== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.25s ease;
  text-decoration: none;
}

.entry-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.entry-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 4px;
  transition: all 0.25s ease;
}

.entry-card:hover .entry-icon {
  background: var(--accent);
  color: #fff;
}

.entry-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 2px;
  transition: color 0.2s ease;
}

.entry-card:hover .entry-title {
  color: var(--accent);
}

.entry-desc {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ========== 热门诗人 ========== */
.poet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.poet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
  overflow: hidden;
}

.poet-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.poet-rank {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  opacity: 0.6;
}

.poet-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 2px;
  transition: color 0.2s ease;
}

.poet-card:hover .poet-name {
  color: var(--accent);
}

.poet-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
  min-height: 36px;
}

.poet-count {
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--border-light);
  transition: border-color 0.2s ease;
}

.poet-card:hover .poet-count {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== 年代 / 分类卡片 ========== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 20px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.cat-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.cat-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 2px;
  transition: color 0.2s ease;
}

.cat-card:hover .cat-name {
  color: var(--accent);
}

.cat-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cat-count {
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--border-light);
  transition: border-color 0.2s ease;
}

.cat-card:hover .cat-count {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .entry-grid,
  .poet-grid,
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 40px 0 36px;
  }

  .hero-title {
    font-size: 2.4rem;
    letter-spacing: 6px;
  }

  .hero-sub {
    font-size: 13px;
    letter-spacing: 2px;
  }

  .hero-desc {
    font-size: 13px;
    margin-bottom: 26px;
  }

  .hero-search {
    margin-bottom: 32px;
  }

  .hero-search input {
    font-size: 14px;
  }

  .hero-search button {
    padding: 8px 18px;
    font-size: 13px;
  }

  .hero-stats {
    gap: 26px;
  }

  .stat-num {
    font-size: 1.3rem;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.4rem;
    letter-spacing: 3px;
  }

  .entry-grid,
  .poet-grid,
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .entry-card {
    padding: 22px 12px;
  }

  .entry-icon {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }

  .entry-title {
    font-size: 1rem;
  }

  .poet-card,
  .cat-card {
    padding: 14px 14px 12px;
  }

  .poet-name,
  .cat-name {
    font-size: 1.05rem;
  }

  .poet-desc {
    min-height: 32px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
    letter-spacing: 4px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-num {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 11px;
  }

  .entry-grid,
  .poet-grid,
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .intro-text {
    font-size: 13px;
    padding: 0 6px;
  }
}
/* ============================================================
   实用工具区（轻量版，跟页面融合）
   ============================================================ */
.tools-section {
  padding: 56px 0 48px;
  background: transparent;
  border: none;
}

.tools-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 3px;
  margin-bottom: 22px;
}

.tools-header i {
  color: var(--accent);
  font-size: 12px;
  opacity: 0.7;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}

.tool-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.tool-item i {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.tool-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.tool-item:hover i {
  color: var(--accent);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
  .tools-section {
    padding: 40px 0 36px;
  }

  .tools-header {
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 16px;
  }

  .tools-list {
    gap: 8px;
  }

  .tool-item {
    padding: 7px 14px;
    font-size: 12px;
    gap: 6px;
  }

  .tool-item i {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .tools-section {
    padding: 32px 0 28px;
  }

  .tools-list {
    gap: 6px;
  }

  .tool-item {
    padding: 6px 12px;
    font-size: 12px;
  }
}