/* ABOUTME: Post detail page stylesheet */
/* ABOUTME: 帖子详情页专用样式 */

/* 主内容区域 */
.post-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

.post-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

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

.separator {
  color: var(--text-muted);
}

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

/* 帖子主体 */
.post-article {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* 文章头部 */
.article-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.article-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-tertiary);
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.author-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.meta-right {
  display: flex;
  gap: 1.5rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.meta-value.highlight-time {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9375rem;
}

/* 文章内容 */
.article-content {
  color: var(--text-primary);
  line-height: 1.8;
}

.content-intro {
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.content-intro p {
  margin: 0;
  color: var(--text-secondary);
}

/* 下载卡片 */
.download-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  color: white;
  margin-bottom: 2rem;
}

.download-card-blue {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.download-card-green {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.download-card-orange {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.download-icon {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.download-info {
  flex: 1;
}

.download-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.download-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: #667eea;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.download-btn-blue {
  background: white;
  color: #4facfe;
}

.download-btn-blue:hover {
  box-shadow: 0 8px 20px rgba(79,172,254,0.4);
}

.download-btn-green {
  background: white;
  color: #11998e;
}

.download-btn-green:hover {
  box-shadow: 0 8px 20px rgba(17,153,142,0.4);
}

.download-icon-btn {
  font-size: 1.25rem;
}

/* 内容段落 */
.content-section {
  margin-bottom: 1.5rem;
}

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

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.feature-list li {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.feature-list li:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

/* 亮点盒子 */
.highlight-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.highlight-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.highlight-item:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.highlight-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.highlight-content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.highlight-content p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* 组织架构图 */
.org-chart {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.org-level {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.org-level-3 {
  flex-wrap: wrap;
}

.org-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  min-width: 140px;
  transition: all 0.2s;
}

.org-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.org-top {
  background: var(--accent-gradient);
  color: white;
  border: none;
}

.org-top:hover {
  transform: translateY(-2px) scale(1.02);
}

.org-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.org-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.org-top .org-desc {
  color: rgba(255,255,255,0.85);
}

.org-connector {
  width: 2px;
  height: 20px;
  background: var(--border-color);
  margin: 0.5rem auto;
}

/* 人员配置表格 */
.config-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
}

.config-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 2fr;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.config-header {
  background: var(--accent-gradient);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.config-cell {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.config-cell.highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

/* 内容标签 */
.content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.tag {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.tag:hover {
  background: var(--accent-gradient);
  color: white;
}

/* 文章底部操作 */
.article-actions {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

.like-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.collect-btn:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #d97706;
}

/* 上一篇/下一篇 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.nav-prev,
.nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-next {
  text-align: right;
}

.nav-prev:hover,
.nav-next:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.nav-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-title {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* 评论区 */
.comments-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.comments-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.comments-filter {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: var(--bg-tertiary);
}

.filter-btn.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

/* 评论输入框 */
.comment-input {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.comment-textarea {
  flex: 1;
  min-height: 80px;
  padding: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  resize: vertical;
  font-family: inherit;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.btn-submit {
  align-self: flex-end;
  padding: 0.625rem 1.5rem;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 评论列表 */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

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

.author-badge-small {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.625rem;
  border-radius: var(--radius-sm);
  margin-left: 0.25rem;
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
}

.comment-action {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.comment-action:hover {
  color: var(--accent-primary);
}

/* 评论回复 */
.comment-reply {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-primary);
}

.comment-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.reply-body {
  flex: 1;
}

/* 加载更多 */
.load-more-comments {
  text-align: center;
  margin-top: 1.5rem;
}

.btn-load-more {
  padding: 0.75rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-load-more:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

/* 侧边栏 */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.author-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.author-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  margin: 0 auto 1rem;
}

.author-name-lg {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.author-title {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.author-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-follow {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-follow:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 相关推荐 */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
}

.related-item:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.related-tag {
  padding: 0.25rem 0.5rem;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.625rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.related-title {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .post-main {
    grid-template-columns: 1fr;
  }
  
  .post-sidebar {
    order: -1;
  }
  
  .author-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    text-align: left;
    padding: 1.5rem;
  }
  
  .author-avatar-lg {
    margin: 0;
    width: 60px;
    height: 60px;
  }
  
  .author-title {
    margin-bottom: 0;
  }
  
  .author-stats {
    border: none;
    padding: 0;
    margin: 0;
    gap: 1.5rem;
  }
  
  .btn-follow {
    width: auto;
    padding: 0.625rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .article-title {
    font-size: 1.375rem;
  }
  
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .meta-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .download-card {
    flex-direction: column;
    text-align: center;
  }
  
  .article-nav {
    grid-template-columns: 1fr;
  }
  
  .nav-next {
    text-align: left;
  }
  
  .comment-input {
    flex-direction: column;
  }
  
  .btn-submit {
    width: 100%;
    align-self: flex-end;
  }
  
  .article-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .post-article {
    padding: 1.25rem;
  }
  
  .comments-section {
    padding: 1.25rem;
  }
  
  .download-meta {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .highlight-box {
    grid-template-columns: 1fr;
  }
  
  .highlight-item {
    padding: 0.875rem;
  }
  
  .highlight-icon {
    font-size: 1.5rem;
  }
  
  .org-level-3 {
    flex-direction: column;
    align-items: center;
  }
  
  .org-card {
    width: 100%;
    max-width: 200px;
  }
  
  .config-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .config-cell.highlight {
    color: var(--accent-primary);
  }
}
