/*
ID选择器和class选择器
ID选择用#标识，只能用一次
class选择器，用点号标识,可以复用，标识一组

p.center {
  text-align: center;
}   标识所有P标签的文字都是居中

*/

/* 全局通用 */
.layui-container {
  position: relative;
  margin: 0 auto;
  box-sizing: border-box;
  /* background-color: #FFF8ED; */
}

/* 网站名称头部样式 */
.novel-header {
  width: 100%;
  padding: 10px 0;
}

.novel-header .layui-row {
  max-width: 1200px;
  margin: 0 auto;
  width: 90%;
}

.layui-fluid {
  position: relative;
  margin: 0 auto;
  padding: 0 15px
}

.layui-row:after,
.layui-row:before {
  content: "";
  display: block;
  clear: both;
  padding-top: 5px;
}

h1 {
  text-align: center;
  padding-top: 5px;
  padding-bottom: 5px;
  font-weight: 600;
}

h2 {
  font-weight: bold;
  font-size: 18px;
}

li {
  line-height: 2em;
  padding-top: 5px;
  padding-bottom: 5px;
  overflow: hidden; /* 隐藏超出的内容 */
  white-space: nowrap; /* 内容在同一行显示 */
  text-overflow: ellipsis; /* 当内容超出时用省略号表示 */
}

#pic {
  line-height: 1.9;
}

.nav {
  font-size: 16px;
  font-weight: bold;
  padding-top: 10px;
}

.nav-small {
  font-size: 14px;
  padding-top: 10px;
}

.intro {
  text-indent: 2em;
  line-height: 1.9;
}

/* home-page */
.tj {
  padding-top: 5px;
  text-align: center;
}

/* read-page*/
p {
  /* 字体大小 */
  font-size: 16px;

  /* 段落间距 */
  margin-bottom: 1.5em;

  /* 段落缩进 */
  text-indent: 2em;
  /* 行高 */
  line-height: 2em;
}

.content {
  background-color: #FFF8ED;
}

/* 章节阅读页面样式 */
.chapter-content {
  line-height: 1.8;
  font-size: 16px;
  color: #2c3e50;
  padding: 20px;
  background: #f7f3e9; /* 护眼棕黄色背景 */
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 10px 0;
  border: 1px solid #e8dcc0; /* 淡棕色边框 */
}

.chapter-content .paragraph {
  margin: 0 0 1.2em 0;
  text-indent: 2em;
  line-height: 1.8;
  word-wrap: break-word;
  word-break: break-all;
  color: #3c3c3c; /* 深灰色文字，护眼 */
}

.chapter-content .dialogue {
  margin: 0 0 1em 0;
  padding-left: 2em;
  color: #5a5a5a; /* 稍浅的灰色 */
  font-style: italic;
  border-left: 3px solid #d4af37; /* 金色边框 */
  background: #faf8f3; /* 更浅的棕黄色背景 */
  padding: 8px 12px;
  border-radius: 4px;
}

.chapter-content .chapter-title {
  margin: 1.5em 0 1em 0;
  font-size: 18px;
  font-weight: bold;
  color: #8b4513; /* 深棕色标题 */
  text-align: center;
  border-bottom: 2px solid #d4af37; /* 金色下划线 */
  padding-bottom: 8px;
}

.chapter-content h3 {
  margin: 1.5em 0 1em 0;
  font-size: 18px;
  font-weight: bold;
  color: #8b4513; /* 深棕色标题 */
}

/* 空行处理 */
.chapter-content p:empty {
  height: 1.2em;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .chapter-content {
    font-size: 15px;
    padding: 15px;
    margin: 5px 0;
    background: #f7f3e9; /* 保持护眼背景 */
  }
  
  .chapter-content .paragraph {
    text-indent: 1.5em;
    line-height: 1.7;
  }
  
  .chapter-content .dialogue {
    padding-left: 1.5em;
    font-size: 14px;
  }
}

.nav {
  font-size: 16px;
  font-weight: bold;
  padding-top: 10px;
}

.nav a {
  margin: 10px
}

/* 章节列表页样式 */
.chapter-list {
  margin: 15px 0;
  padding: 0 10px;
}

.chapter-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 0;
  transition: background-color 0.3s ease;
}

.chapter-item:hover {
  background-color: #f8f9fa;
}

.chapter-item:last-child {
  border-bottom: none;
}

.chapter-link {
  display: block;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  word-wrap: break-word;
  word-break: break-all;
}

.chapter-link:hover {
  color: #1890ff;
  background-color: #e6f7ff;
  text-decoration: none;
}

/* 分页样式 */
.pagination {
  text-align: center;
  margin: 20px 0;
  padding: 15px 0;
}

.pagination select {
  margin: 0 10px;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
}

.pagination a {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 5px;
  background-color: #1890ff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.pagination a:hover {
  background-color: #40a9ff;
  text-decoration: none;
}

.pagination a.disabled-btn {
  background-color: #d9d9d9;
  color: #999;
  cursor: not-allowed;
}

.pagination a.disabled-btn:hover {
  background-color: #d9d9d9;
}

/* 列表页标题样式 */
.chapter-title {
  text-align: center;
  margin: 20px 0;
  padding: 15px 0;
  border-bottom: 2px solid #1890ff;
}

.chapter-title h1 {
  margin: 0;
  color: #1890ff;
  font-size: 24px;
  font-weight: 600;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
  .chapter-list {
    margin: 10px 0;
    padding: 0 5px;
  }
  
  .chapter-item {
    padding: 10px 0;
  }
  
  .chapter-link {
    font-size: 15px;
    padding: 6px 10px;
    line-height: 1.5;
  }
  
  .chapter-title h1 {
    font-size: 20px;
  }
  
  .pagination {
    margin: 15px 0;
    padding: 10px 0;
  }
  
  .pagination a {
    padding: 6px 12px;
    font-size: 13px;
    margin: 0 3px;
  }
  
  .pagination select {
    padding: 6px 8px;
    font-size: 13px;
    margin: 0 5px;
  }
}

/* 超长章节名称处理 */
.chapter-link {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 章节列表网格布局（可选） */
@media (min-width: 768px) {
  .chapter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    margin: 20px 0;
  }
  
  .chapter-item {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .chapter-link {
    padding: 15px;
    border-radius: 8px;
    height: 100%;
    display: flex;
    align-items: center;
  }
}

/* 最近阅读页面样式 - 移动端优化 */
.recent-list {
  margin: 10px 0;
}

.recent-item {
  display: flex;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  position: relative;
}

.recent-item:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.recent-cover {
  margin-right: 12px;
  flex-shrink: 0;
}

.recent-cover img {
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recent-info {
  flex: 1;
  min-width: 0;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.recent-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  line-height: 1.3;
}

.recent-info h3 a {
  color: #333;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-info h3 a:hover {
  color: #1890ff;
}

.recent-delete-btn {
  background: #ff4d4f;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.3s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.recent-delete-btn:hover {
  background: #ff7875;
  transform: scale(1.1);
}

.recent-author {
  margin: 4px 0;
  font-size: 13px;
  color: #666;
  line-height: 1.2;
}

.recent-status {
  margin: 4px 0;
  font-size: 12px;
  color: #999;
  line-height: 1.2;
}

/* 简化的章节信息样式 */
.recent-chapter-simple {
  margin: 8px 0;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 2px solid #1890ff;
}

.recent-chapter-simple p {
  margin: 3px 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.chapter-label {
  color: #666;
  font-weight: 500;
  margin-right: 6px;
  min-width: 30px;
  flex-shrink: 0;
}

.chapter-link {
  color: #1890ff;
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-link:hover {
  text-decoration: underline;
  color: #40a9ff;
}

.recent-progress-simple {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.progress-text {
  color: #52c41a;
  font-weight: 500;
  font-size: 11px;
  margin-right: 8px;
  flex-shrink: 0;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
  min-width: 60px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.recent-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}

.recent-actions .layui-btn {
  margin: 0;
  font-size: 11px;
  padding: 4px 8px;
  height: auto;
  line-height: 1.3;
  flex: 1;
  text-align: center;
}

.empty-recent {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.empty-recent h3 {
  margin: 0 0 10px 0;
  color: #666;
}

.empty-recent p {
  margin: 0 0 20px 0;
  font-size: 14px;
}

/* 移动端最近阅读优化 */
@media (max-width: 768px) {
  .recent-item {
    padding: 10px;
    margin-bottom: 8px;
  }
  
  .recent-cover {
    margin-right: 10px;
  }
  
  .recent-cover img {
    width: 50px;
    height: 65px;
  }
  
  .recent-info h3 {
    font-size: 15px;
    line-height: 1.2;
  }
  
  .recent-author {
    font-size: 12px;
  }
  
  .recent-status {
    font-size: 11px;
  }
  
  .recent-chapter-simple {
    padding: 6px;
    margin: 6px 0;
  }
  
  .recent-chapter-simple p {
    font-size: 11px;
  }
  
  .chapter-label {
    min-width: 25px;
    margin-right: 4px;
  }
  
  .progress-text {
    font-size: 10px;
    margin-right: 6px;
  }
  
  .progress-bar {
    height: 3px;
    min-width: 50px;
  }
  
  .recent-actions {
    margin-top: 8px;
    gap: 4px;
  }
  
  .recent-actions .layui-btn {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .recent-delete-btn {
    width: 18px;
    height: 18px;
    font-size: 9px;
    margin-left: 6px;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .recent-item {
    padding: 8px;
  }
  
  .recent-cover img {
    width: 45px;
    height: 60px;
  }
  
  .recent-info h3 {
    font-size: 14px;
  }
  
  .recent-chapter-simple {
    padding: 5px;
  }
  
  .recent-actions .layui-btn {
    font-size: 9px;
    padding: 2px 4px;
  }
}

/* 相关阅读样式 */
.related-article-item {
  margin-bottom: 15px;
  padding: 8px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
  transition: all 0.3s ease;
}

.related-article-item:hover {
  border-color: #5FB878;
  background: #f0f9ff;
  box-shadow: 0 2px 8px rgba(95, 184, 120, 0.2);
}

.related-article-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-article-item li {
  margin-bottom: 5px;
  text-align: center;
}

.related-article-item li:last-child {
  margin-bottom: 0;
}

.article-title a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
}

.article-title a:hover {
  color: #5FB878;
}

.article-author a {
  color: #666;
  text-decoration: none;
  font-size: 11px;
}

.article-author a:hover {
  color: #5FB878;
}

.article-reason {
  margin-top: 5px;
}

.reason-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  color: #fff;
  font-weight: 500;
}

.reason-category {
  background: linear-gradient(45deg, #5FB878, #4CAF50);
}

.reason-hot {
  background: linear-gradient(45deg, #FF6B6B, #FF5722);
}

.reason-author {
  background: linear-gradient(45deg, #4A90E2, #2196F3);
}

.reason-random {
  background: linear-gradient(45deg, #9C27B0, #673AB7);
}

.no-related {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 20px;
  font-style: italic;
}

/* 相关阅读响应式优化 */
@media (max-width: 768px) {
  .related-article-item {
    margin-bottom: 10px;
    padding: 6px;
  }
  
  .article-title a {
    font-size: 12px;
  }
  
  .article-author a {
    font-size: 10px;
  }
  
  .reason-tag {
    font-size: 9px;
    padding: 1px 4px;
  }
}

@media (max-width: 480px) {
  .related-article-item {
    margin-bottom: 8px;
    padding: 4px;
  }
  
  .article-title a {
    font-size: 11px;
  }
  
  .article-author a {
    font-size: 9px;
  }
  
  .reason-tag {
    font-size: 8px;
    padding: 1px 3px;
  }
}

/* 作者其他作品样式优化 */
.author-work-item {
  margin-bottom: 15px;
  padding: 8px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fafafa;
  transition: all 0.3s ease;
  position: relative;
}

.author-work-item:hover {
  border-color: #5FB878;
  background: #f0f9ff;
  box-shadow: 0 2px 8px rgba(95, 184, 120, 0.2);
}

.author-work-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.author-work-item li {
  margin-bottom: 5px;
  text-align: center;
}

.author-work-item li:last-child {
  margin-bottom: 0;
}

.work-title a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
}

.work-title a:hover {
  color: #5FB878;
}

/* 长尾关键词特殊样式 */
.langtail-work {
  border-color: #FF9800;
  background: linear-gradient(135deg, #fff8e1, #f3e5ab);
}

.langtail-work:hover {
  border-color: #F57C00;
  background: linear-gradient(135deg, #fff3e0, #ffcc02);
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.3);
}

.langtail-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: linear-gradient(45deg, #FF9800, #F57C00);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 10;
}

.langtail-desc {
  font-size: 11px;
  color: #666;
  font-style: italic;
  margin-top: 3px;
}

/* 长尾关键词响应式优化 */
@media (max-width: 768px) {
  .author-work-item {
    margin-bottom: 10px;
    padding: 6px;
  }
  
  .work-title a {
    font-size: 12px;
  }
  
  .langtail-badge {
    font-size: 9px;
    padding: 1px 4px;
  }
  
  .langtail-desc {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .author-work-item {
    margin-bottom: 8px;
    padding: 4px;
  }
  
  .work-title a {
    font-size: 11px;
  }
  
  .langtail-badge {
    font-size: 8px;
    padding: 1px 3px;
  }
  
  .langtail-desc {
    font-size: 9px;
  }
}