/* Single Post Page Styles */

/* 基础CSS变量 */
:root {
  --primary-color: #dc0000;
  --text-primary: #333333;
  --text-secondary: #666666;
  --bg-light: #f8f9fa;
  --border-color: #e9ecef;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

/* 面包屑导航样式 */
.single-post-header {
  background-color: var(--bg-light);
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb .current-breadcrumb {
  color: var(--text-primary);
  font-weight: 500;
}

/* 主内容区域样式 */
.single-post-container {
  padding: 2.5rem 0;
}

.single-post-content {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

/* 文章标题样式 */
.single-post-content h1.entry-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  position: relative;
  padding-bottom: 1rem;
}

.single-post-content h1.entry-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* 文章元数据样式 */
.single-post-content .entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.single-post-content .entry-meta a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.single-post-content .entry-meta a:hover {
  color: var(--primary-color);
}

/* 文章正文样式 */
.single-post-content .entry-content {
  line-height: 1.8;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.single-post-content .entry-content p {
  margin-bottom: 1.5rem;
}

.single-post-content .entry-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.single-post-content .entry-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.8rem 0 1rem;
}

.single-post-content .entry-content h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.8rem;
}

.single-post-content .entry-content a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px dotted var(--primary-color);
}

.single-post-content .entry-content a:hover {
  border-bottom-style: solid;
  opacity: 0.9;
}

.single-post-content .entry-content ul,
.single-post-content .entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.8rem;
}

.single-post-content .entry-content li {
  margin-bottom: 0.5rem;
}

.single-post-content .entry-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--bg-light);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

.single-post-content .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.single-post-content .entry-content img:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.01);
}

/* 文章标签和分类样式 */
.single-post-content .entry-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.single-post-content .entry-footer .tags-links,
.single-post-content .entry-footer .cat-links {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.single-post-content .entry-footer .tags-links a,
.single-post-content .entry-footer .cat-links a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: var(--bg-light);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 20px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.single-post-content .entry-footer .tags-links a:hover,
.single-post-content .entry-footer .cat-links a:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* 相关文章区域样式 */
.related-posts-section {
  background-color: var(--bg-light);
  padding: 3rem 0;
  margin-top: 2rem;
}

.related-posts-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.related-posts-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0.8rem auto 0;
  border-radius: 3px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.related-post {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.related-post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.related-post-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.related-post-image a {
  display: block;
  height: 100%;
}

.related-post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-post:hover .related-post-img {
  transform: scale(1.08);
}

.related-post-content {
  padding: 1.5rem;
}

.related-post-category {
  font-size: 0.85rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.related-post-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  text-align: left;
}

.related-post-title::after {
  display: none;
}

.related-post-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.related-post-title a:hover {
  color: var(--primary-color);
}

.related-post-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.no-related-posts {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* 评论区域样式 */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.comments-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.comment-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.comment-list li:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}

.comment-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 0.8rem;
}

.comment-author-name {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.comment-content {
  color: var(--text-primary);
  line-height: 1.6;
}

.comment-reply-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.comment-reply-link:hover {
  text-decoration: underline;
}

.comment-form {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
}

.comment-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 1rem;
  transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(220, 0, 0, 0.1);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form-submit {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.comment-form-submit:hover {
  background-color: #b30000;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .single-post-content {
    padding: 1.8rem;
  }
  
  .single-post-content h1.entry-title {
    font-size: 2rem;
  }
  
  .single-post-content .entry-meta {
    gap: 1rem;
  }
  
  .single-post-content .entry-content h2 {
    font-size: 1.6rem;
  }
  
  .single-post-content .entry-content h3 {
    font-size: 1.3rem;
  }
  
  .single-post-content .entry-content h4 {
    font-size: 1.1rem;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .related-post-title {
    font-size: 1.5rem;
  }
  
  .related-post-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .single-post-header {
    padding: 1rem 0;
  }
  
  .breadcrumb {
    font-size: 0.85rem;
  }
  
  .single-post-container {
    padding: 1.5rem 0;
  }
  
  .single-post-content {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .single-post-content h1.entry-title {
    font-size: 1.8rem;
  }
  
  .single-post-content .entry-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .related-posts-section {
    padding: 2rem 0;
  }
  
  .related-post-title {
    font-size: 1.3rem;
  }
  
  .related-post-content {
    padding: 1.2rem;
  }
  
  .related-post-title {
    font-size: 1.1rem;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.single-post-content {
  animation: fadeInUp 0.6s ease-out;
}

.related-post {
  animation: fadeInUp 0.5s ease-out;
}

.related-post:nth-child(2) {
  animation-delay: 0.1s;
}

.related-post:nth-child(3) {
  animation-delay: 0.2s;
}