/* ============================================================
   诗词频道样式 shici.css
   依赖 commonality.css 提供的 nav/search/footer 基础样式
   ============================================================ */

.sc-wrap {
  padding: 15px 0;
}

/* ---- 通用区块标题 ---- */
.sc-block {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  margin-bottom: 16px;
}
.sc-block-hd {
  padding: 10px 15px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-block-hd h2 {
  font-size: 17px;
  color: #333;
  font-weight: 700;
  margin: 0;
}
.sc-block-hd h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: #c0392b;
  margin-right: 8px;
  vertical-align: -2px;
  border-radius: 2px;
}
.sc-block-hd .more {
  font-size: 13px;
  color: #999;
}
.sc-block-hd .more:hover {
  color: #c0392b;
}
.sc-block-bd {
  padding: 15px;
}

/* ---- A-Z / 朝代 导航条 ---- */
.sc-navbar {
  padding: 8px 0;
}
.sc-navbar a {
  display: inline-block;
  padding: 3px 10px;
  margin: 3px;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
  color: #555;
  font-size: 14px;
}
.sc-navbar a:hover,
.sc-navbar a.active {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.sc-navbar a .cnt {
  color: #bbb;
  font-size: 12px;
  margin-left: 3px;
}
.sc-navbar a:hover .cnt,
.sc-navbar a.active .cnt {
  color: #ffd9d4;
}

/* ---- 标签云 ---- */
.sc-tagcloud a {
  display: inline-block;
  padding: 4px 12px;
  margin: 4px;
  background: #f7f7f7;
  border-radius: 14px;
  color: #666;
  font-size: 13px;
}
.sc-tagcloud a:hover {
  background: #c0392b;
  color: #fff;
}
.sc-taggroup {
  margin-bottom: 10px;
}
.sc-taggroup .gt {
  color: #999;
  font-size: 13px;
  margin-right: 8px;
  float: left;
  line-height: 26px;
}
.sc-taggroup .gi {
  overflow: hidden;
}

/* ---- 诗词列表 ---- */
.sc-poemlist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sc-poemlist li {
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}
.sc-poemlist li:last-child {
  border-bottom: none;
}
.sc-poemlist .t a {
  font-size: 16px;
  color: #2c3e50;
  font-weight: 600;
}
.sc-poemlist .t a:hover {
  color: #c0392b;
}
.sc-poemlist .m {
    color: #555;
    font-size: 16px;
    line-height: 30px;
    margin-top: 8px;
}
.sc-poemlist .m a {
  color: #888;
}
.sc-poemlist .m a:hover {
  color: #c0392b;
}
.sc-poemlist .m .era {
  color: #c0392b;
}
.sc-poemlist .tags {
  margin-top: 5px;
}
.sc-poemlist .tags a {
  display: inline-block;
  font-size: 12px;
  color: #999;
  background: #f5f5f5;
  padding: 1px 8px;
  border-radius: 10px;
  margin-right: 5px;
}
.sc-poemlist .tags a:hover {
  color: #c0392b;
}

/* 紧凑两列网格（用于全部/排行） */
.sc-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.sc-grid li {
  float: left;
  width: 50%;
  box-sizing: border-box;
  padding: 6px 10px;
}
.sc-grid li a {
  color: #2c3e50;
  font-size: 15px;
}
.sc-grid li a:hover {
  color: #c0392b;
}
.sc-grid li .au {
  color: #aaa;
  font-size: 12px;
  margin-left: 6px;
}

/* ---- 诗人卡片网格 ---- */
.sc-authors {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.sc-authors li {
  float: left;
  width: 25%;
  box-sizing: border-box;
  padding: 8px;
  text-align: center;
}
.sc-authors .av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
}
.sc-authors .nm {
  display: block;
  margin-top: 6px;
  color: #2c3e50;
  font-size: 15px;
  font-weight: 600;
}
.sc-authors .nm:hover {
  color: #c0392b;
}
.sc-authors .er {
  color: #aaa;
  font-size: 12px;
}
.sc-authors .wk {
  color: #c0392b;
  font-size: 12px;
}

/* ---- 诗词详情 ---- */
.sc-detail {
  text-align: center;
  padding: 25px 15px;
}
.sc-detail h1 {
  font-size: 26px;
  color: #2c3e50;
  margin: 0 0 12px;
  font-weight: 700;
}
.sc-detail .meta {
  color: #999;
  font-size: 14px;
  margin-bottom: 18px;
}
.sc-detail .meta a {
  color: #c0392b;
}
.sc-detail .meta .era {
  margin-right: 8px;
}
.sc-content {
  font-size: 19px;
  line-height: 2.1;
  color: #333;
  letter-spacing: 1px;
}
.sc-content p {
  margin: 4px 0;
}
.sc-tags {
  margin-top: 20px;
}
.sc-tags a {
  display: inline-block;
  font-size: 13px;
  color: #c0392b;
  border: 1px solid #f0c8c2;
  padding: 2px 12px;
  border-radius: 12px;
  margin: 3px;
}
.sc-tags a:hover {
  background: #c0392b;
  color: #fff;
}

/* 逐句翻译/注释 */
.sc-sentence {
  padding: 12px 0;
  border-bottom: 1px dashed #eee;
}
.sc-sentence .orig {
  font-size: 17px;
  color: #2c3e50;
  font-weight: 600;
}
.sc-sentence .trans {
  color: #666;
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.8;
}
.sc-sentence .anno {
  color: #999;
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.7;
}

/* 翻译/赏析折叠块 */
.sc-block-text {
  line-height: 1.9;
  color: #444;
  font-size: 15px;
}
.sc-block-text p {
  margin: 8px 0;
  text-indent: 0;
}
.sc-block-text h2,
.sc-block-text h3,
.sc-block-text h4 {
  color: #2c3e50;
  margin: 18px 0 8px;
  font-weight: 700;
}
.sc-block-text h2 { font-size: 19px; }
.sc-block-text h3 { font-size: 17px; }
.sc-block-text h4 { font-size: 15px; }
.sc-block-text ul,
.sc-block-text ol {
  margin: 8px 0;
  padding-left: 24px;
}
.sc-block-text li {
  margin: 4px 0;
}
.sc-block-text blockquote {
  margin: 12px 0;
  padding: 10px 16px;
  border-left: 3px solid #c0392b;
  background: #fdf8f7;
  color: #666;
  font-size: 14px;
}
.sc-block-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.sc-block-text th,
.sc-block-text td {
  padding: 8px 10px;
  border: 1px solid #e8e8e8;
  text-align: left;
}
.sc-block-text th {
  background: #f7f7f7;
  font-weight: 600;
  color: #333;
}
.sc-block-text img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 8px 0;
}
.sc-block-text a {
  color: #c0392b;
  text-decoration: none;
}
.sc-block-text a:hover {
  text-decoration: underline;
}
.sc-block-text hr {
  border: none;
  border-top: 1px dashed #ddd;
  margin: 16px 0;
}
.sc-sub {
  font-weight: 700;
  color: #c0392b;
  margin: 12px 0 6px;
  font-size: 15px;
}

/* ---- 作者信息表 ---- */
.sc-profile {
  width: 100%;
  border-collapse: collapse;
}
.sc-profile td {
  padding: 8px 10px;
  border: 1px solid #f0f0f0;
  font-size: 14px;
}
.sc-profile td.k {
  width: 90px;
  background: #fafafa;
  color: #999;
  text-align: center;
}
.sc-profile td.v {
  color: #444;
}

/* ---- 作者头部 ---- */
.sc-author-hd {
  display: flex;
  align-items: center;
  padding: 20px 15px;
}
.sc-author-hd .av {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 18px;
  background: #f0f0f0;
}
.sc-author-hd .info h1 {
  font-size: 24px;
  color: #2c3e50;
  margin: 0 0 6px;
}
.sc-author-hd .info .py {
  color: #999;
  font-size: 14px;
  margin-bottom: 6px;
}
.sc-author-hd .info .era {
  color: #c0392b;
  font-size: 14px;
}
.sc-author-hd .info .wc {
  color: #888;
  font-size: 13px;
  margin-left: 10px;
}

/* ---- 名句 ---- */
.sc-mingju {
  padding: 18px 15px;
  text-align: center;
}
.sc-mingju .s {
  font-size: 22px;
  color: #2c3e50;
  line-height: 1.9;
  font-weight: 600;
}
.sc-mingju .from {
  margin-top: 12px;
  color: #999;
  font-size: 14px;
}
.sc-mingju .from a {
  color: #c0392b;
}
.sc-mingjulist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sc-mingjulist li {
  padding: 12px 0;
  border-bottom: 1px dashed #eee;
}
.sc-mingjulist .s {
  font-size: 17px;
  color: #2c3e50;
}
.sc-mingjulist .s a:hover {
  color: #c0392b;
}
.sc-mingjulist .from {
  color: #999;
  font-size: 13px;
  margin-top: 4px;
}
.sc-mingjulist .from a {
  color: #888;
}

/* ---- 侧边栏 ---- */
.sc-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sc-side-list li {
  padding: 7px 0;
  border-bottom: 1px dashed #f0f0f0;
  overflow: hidden;
}
.sc-side-list li:last-child {
  border-bottom: none;
}
.sc-side-list a {
  color: #555;
  font-size: 14px;
}
.sc-side-list a:hover {
  color: #c0392b;
}
.sc-side-list .au {
  color: #bbb;
  font-size: 12px;
  margin-left: 6px;
}

/* ---- 分页 ---- */
.sc-pager {
  text-align: center;
  padding: 18px 0;
}
.sc-pager a,
.sc-pager span {
  display: inline-block;
  padding: 5px 12px;
  margin: 0 3px;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
  color: #666;
  font-size: 14px;
}
.sc-pager a:hover {
  border-color: #c0392b;
  color: #c0392b;
}
.sc-pager span.current {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.sc-pager span.disabled {
  color: #ccc;
}
.sc-pager .total {
  border: none;
  color: #999;
}

/* ---- 空状态 ---- */
.sc-empty {
  text-align: center;
  color: #aaa;
  padding: 40px 0;
  font-size: 15px;
}

/* ---- 搜索结果类型切换 ---- */
.sc-searchtype a {
  display: inline-block;
  padding: 4px 14px;
  margin-right: 8px;
  border: 1px solid #e3e3e3;
  border-radius: 3px;
  color: #666;
}
.sc-searchtype a.active {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* ---- 可折叠内容块 ---- */
.sc-collapsible {
  position: relative;
  max-height: 350px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sc-collapsible.expanded {
  max-height: none;
}

.sc-collapsible::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  pointer-events: none;
}

.sc-collapsible.expanded::after {
  display: none;
}

.sc-expand-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: #f8f8f8;
  border: none;
  border-top: 1px solid #e0e0e0;
  color: #c0392b;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.sc-expand-btn:hover {
  background: #f0f0f0;
}

.sc-expand-btn::before {
  content: "展开全部 ▼";
}

.sc-collapsible.expanded + .sc-expand-btn::before {
  content: "收起 ▲";
}

/* 诗词网格（3列） */
.sc-poem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.sc-poem-grid-item {
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
  transition: background 0.2s;
}

.sc-poem-grid-item:hover {
  background: #f0f0f0;
}

.sc-poem-grid-item a {
  display: inline;
  color: #2c3e50;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.sc-poem-grid-item a:hover {
  color: #c0392b;
}

.sc-poem-grid-item .author {
  display: inline;
  color: #999;
  font-size: 13px;
  margin-left: 4px;
}

.sc-poem-grid-item .author a {
  color: #999;
  text-decoration: none;
}

.sc-poem-grid-item .author a:hover {
  color: #c0392b;
}

/* 朝代区块 */
.dynasty-block {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #e0e0e0;
}

.dynasty-block:last-child {
  border-bottom: none;
}

.dynasty-block h3 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 12px;
  font-weight: 700;
}

.dynasty-block h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.dynasty-block h3 a:hover {
  color: #c0392b;
}

.dynasty-block h3 .cnt {
  font-size: 14px;
  color: #999;
  font-weight: normal;
  margin-left: 8px;
}

/* 朝代区块 - 优化布局 */
.dynasty-row {
  display: flex;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #e0e0e0;
}

.dynasty-row:last-child {
  border-bottom: none;
}

.dynasty-tag {
  flex: 0 0 120px;
  background: #f0f5ff;
  color: #667eea;
  padding: 15px 10px;
  border-radius: 6px;
  text-align: center;
  margin-right: 15px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid #e8e8e8;
}

.dynasty-tag a {
  color: #667eea;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  display: block;
}

.dynasty-tag .cnt {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
  display: block;
}

.dynasty-poems {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.poem-item {
  padding: 8px 10px;
  background: #f9f9f9;
  border-radius: 4px;
  transition: background 0.2s;
}

.poem-item:hover {
  background: #f0f0f0;
}

.poem-item a {
  color: #2c3e50;
  font-size: 14px;
  text-decoration: none;
}

.poem-item a:hover {
  color: #c0392b;
}

.poem-item .author {
  color: #999;
  font-size: 12px;
  margin-left: 4px;
}

/* 侧边栏朝代/作者链接 */
.sc-side-list .au a {
  color: #bbb;
  font-size: 12px;
}

.sc-side-list .au a:hover {
  color: #c0392b;
}

/* 右侧导航浮动 */
.sc-wrap ~ .comm-content-right {
  position: relative;
}

.comm-content-right.sticky-top {
  position: fixed;
  top: 65px;
}

.comm-content-right.bottom-fixed {
  position: fixed;
  top: 0;
}

.comm-content-right.bottom-fixed .sc-block:last-child {
  margin-bottom: 0;
}

.comm-content-right.bottom-end {
  position: absolute;
  bottom: 0;
  top: auto;
}

/* 诗人索引页 - 字母分组布局 */
.author-index {
  position: relative;
  padding-right: 50px !important;
}

.author-letter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed #eee;
}

.author-letter-row:last-of-type {
  border-bottom: none;
}

.letter-tag {
  flex: 0 0 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  background: #667eea;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  border-radius: 6px;
  margin-right: 16px;
}

.author-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px 10px;
  align-content: start;
}

.author-name {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-name:hover {
  color: #c0392b;
}

.letter-more {
  width: 100%;
  display: block;
  text-align: right;
  padding: 6px 0 0;
  font-size: 13px;
  color: #999;
  text-decoration: none;
}

.letter-more:hover {
  color: #c0392b;
}

/* 右侧字母快捷导航（固定定位） */
.author-letter-nav {
  position: absolute;
  right: 8px;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-letter-nav a {
  display: block;
  width: 24px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  color: #888;
  text-decoration: none;
  border-radius: 3px;
}

.author-letter-nav a:hover {
  background: #667eea;
  color: #fff;
}

/* 拼音诗词页 - 字母 + 2列网格 */
.pinyin-poem-row {
  display: flex;
  align-items: flex-start;
}

.pinyin-poem-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 诗人页 - 代表作品 3列网格 */
.author-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 12px;
}

.author-work-item {
  display: block;
  padding: 6px 8px;
  background: #f9f9f9;
  border-radius: 4px;
  color: #2c3e50;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-work-item:hover {
  background: #f0f0f0;
  color: #c0392b;
}

/* 诗人页 - 生平与轶事可折叠 */
.sc-collapsible-wrap {
  position: relative;
}

.sc-collapsible-content {
  max-height: 400px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sc-collapsible-wrap.expanded .sc-collapsible-content {
  max-height: none;
}

.sc-expand-btn {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  background: #f7f7f7;
  border: 1px dashed #ddd;
  border-radius: 4px;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.sc-expand-btn:hover {
  background: #f0f0f0;
  color: #c0392b;
}

/* 诗人页 - 简介中 era 链接 */
.sc-author-hd .info .era a {
  color: #c0392b;
  text-decoration: none;
}

.sc-author-hd .info .era a:hover {
  text-decoration: underline;
}

/* 首页 - 热门诗词 3列网格 */
.index-poem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.index-poem-item {
  padding: 8px 10px;
  background: #f9f9f9;
  border-radius: 4px;
}

.index-poem-item:hover {
  background: #f0f0f0;
}

.index-poem-item a {
  color: #2c3e50;
  font-size: 14px;
  text-decoration: none;
}

.index-poem-item a:hover {
  color: #c0392b;
}

.index-poem-item .meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
}

.index-poem-item .meta a {
  color: #999;
  font-size: 12px;
}

.index-poem-item .meta a:hover {
  color: #c0392b;
}

/* 首页 - 热门诗人 2列网格 */
.index-author-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.index-author-item {
  padding: 5px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.index-author-item a {
  color: #555;
  font-size: 14px;
  text-decoration: none;
}

.index-author-item a:hover {
  color: #c0392b;
}

.index-author-item .au {
  color: #bbb;
  font-size: 12px;
  margin-left: 4px;
}

.index-author-item .au a {
  color: #bbb;
  font-size: 12px;
}

.index-author-item .au a:hover {
  color: #c0392b;
}

/* 排行榜页 - 作者 */
.top-tier {
  margin-bottom: 20px;
}

.top-tier:last-child {
  margin-bottom: 0;
}

.top-tier-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.top-author-card {
  padding: 10px 12px;
  background: #f9f9f9;
  border-radius: 4px;
  border-left: 3px solid #667eea;
}

.top-author-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.top-author-name {
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
}

a.top-author-name:hover {
  color: #c0392b;
}

.top-author-era {
  font-size: 12px;
  color: #999;
  text-decoration: none;
}

.top-author-era:hover {
  color: #c0392b;
}

.top-author-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
}

/* 排行榜页 - 分类诗词 */
.top-cat {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #eee;
}

.top-cat:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.top-cat-hd {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid #c0392b;
}

.top-cat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}

.top-poem-item {
  padding: 5px 0;
  font-size: 14px;
}

.top-poem-item a {
  color: #2c3e50;
  text-decoration: none;
}

.top-poem-item a:hover {
  color: #c0392b;
}

.top-poem-author {
  color: #999;
  font-size: 12px;
  margin-left: 4px;
}

.top-poem-author a {
  color: #999;
  font-size: 12px;
  text-decoration: none;
}

.top-poem-author a:hover {
  color: #c0392b;
}
