/**
 * 灵活内容展示 - 样式
 * 主题变量：--theme-color, --bg-card, --text-primary, --border-radius, --shadow
 */

/* ============================================
   基础变量和容器
   ============================================ */

.flexible-content-wrapper {
  --fc-gap: 24px;
  --fc-border-radius: var(--border-radius, 12px);
  --fc-shadow: var(--shadow, 0 4px 20px rgba(0, 0, 0, 0.08));
  --fc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  width: 100%;
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--bg-card, #ffffff);
  border-radius: var(--fc-border-radius);
  box-shadow: var(--fc-shadow);
  padding: 32px;
  margin-bottom: 24px;
}

/* ============================================
   文章头部信息
   ============================================ */

.fc-article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

.fc-article-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 20px 0;
  color: var(--text-primary);
}

.fc-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.fc-article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fc-article-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fc-article-author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-article-author-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.fc-article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.fc-article-date,
.fc-article-views,
.fc-article-readtime {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
}

.fc-article-date svg,
.fc-article-views svg,
.fc-article-readtime svg {
  opacity: 0.7;
}

.fc-article-body {
  /* 文章内容主体 */
}

/* ============================================
   头部基础样式
   ============================================ */

.fc-article-header {
  margin-bottom: 32px;
  position: relative;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

/* ============================================
   方案A：横向双栏（炫彩封面）
   ============================================ */

.fc-article-header--horizontal {
  display: flex;
  gap: 0;
  min-height: 280px;
  margin: -32px -32px 32px -32px;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
  border-radius: var(--fc-border-radius) var(--fc-border-radius) 0 0;
  overflow: hidden;
}

.fc-article-header--horizontal.fc-article-header--has-image {
  min-height: 320px;
}

/* 左侧特色图 */
.fc-header-image {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
}

.fc-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.fc-article-header--horizontal:hover .fc-header-image img {
  transform: scale(1.03);
}

.fc-header-image__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0) 50%
  );
}

/* 右侧内容区 */
.fc-header-content {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

/* 横向布局 - 分类 */
.fc-header-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-header-category {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--theme-color, #3b82f6) 0%, rgba(139, 92, 246, 0.8) 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.fc-header-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  color: #fff;
}

/* 横向布局 - 标题 */
.fc-header-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: var(--text-primary);
}

/* 横向布局 - 标签 */
.fc-header-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-header-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text-secondary, #64748b);
  font-size: 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

.fc-header-tag--more {
  background: var(--theme-color, #3b82f6);
  color: #fff;
  border-color: transparent;
}

/* 横向布局 - 元信息 */
.fc-header-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
  margin-top: auto;
}

.fc-header-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fc-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.fc-header-author-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.fc-header-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fc-header-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.fc-header-stat svg {
  opacity: 0.6;
}

/* ============================================
   方案B：全宽炫彩卡片
   ============================================ */

.fc-article-header--card {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -32px -32px 32px -32px;
  border-radius: var(--fc-border-radius) var(--fc-border-radius) 0 0;
}

/* 背景层 */
.fc-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  transform: scale(1.05);
}

.fc-header-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

/* 炫彩渐变背景（无特色图时） */
.fc-header-bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.9) 0%,
    rgba(139, 92, 246, 0.9) 50%,
    rgba(236, 72, 153, 0.9) 100%
  );
}

/* 卡片内容 */
.fc-header-card-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  padding: 48px;
  text-align: center;
  color: #fff;
}

/* 顶部：分类和标签 */
.fc-card-top {
  margin-bottom: 24px;
}

.fc-card-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.fc-card-category {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
}

.fc-card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.fc-card-tag {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* 中部：标题 */
.fc-card-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 32px 0;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 底部：作者和元信息 */
.fc-card-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.fc-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fc-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.fc-card-author-name {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

.fc-card-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.3);
}

.fc-card-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-card-stat {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.fc-card-stat-dot {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   wpopt AI 摘要
   ============================================ */

.fc-ai-summary {
  margin-bottom: 32px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--fc-border-radius);
  border-left: 4px solid var(--theme-color, #3b82f6);
}

.fc-ai-summary__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-color, #3b82f6);
  margin-bottom: 10px;
}

.fc-ai-summary__title::before {
  content: '✦';
  font-size: 12px;
}

.fc-ai-summary__content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary, #475569);
}

.fc-ai-summary__content p {
  margin: 0;
}

.fc-ai-summary__content ul,
.fc-ai-summary__content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.fc-ai-summary__content li {
  margin-bottom: 4px;
}

/* ============================================
   版权模块
   ============================================ */

.fc-copyright {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--bg-secondary, #f8fafc);
  border-radius: var(--fc-border-radius);
  border-left: 4px solid var(--theme-color);
  font-size: 14px;
  color: var(--text-secondary);
}

.fc-copyright__title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.fc-copyright__item {
  margin-bottom: 4px;
}

.fc-copyright__item:last-child {
  margin-bottom: 0;
}

/* ============================================
   标签列表
   ============================================ */

.fc-tag-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

.fc-tag-list__icon {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.fc-tag-list__item {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fc-tag-list__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #fff;
}

/* ============================================
   文章末尾按钮区域
   ============================================ */

.fc-article-actions {
  margin-top: 32px;
}

.fc-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary, #64748b);
  background: var(--bg-card);
  border-radius: var(--fc-border-radius);
}

/* ============================================
   文本内容基础样式
   ============================================ */

.fc-text-content {
  font-size: 16px;
  line-height: 1.8;
}

.fc-text-content > * {
  margin-bottom: 20px;
}

.fc-text-content > *:last-child {
  margin-bottom: 0;
}

.fc-text-content h2,
.fc-text-content h3,
.fc-text-content h4 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.4;
  scroll-margin-top: 80px;
}

.fc-text-content h2 {
  font-size: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color, rgba(0, 0, 0, 0.06));
}

.fc-text-content h3 {
  font-size: 20px;
}

.fc-text-content h4 {
  font-size: 18px;
}

.fc-text-content p {
  margin-bottom: 20px;
}

.fc-text-content a {
  color: var(--theme-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.fc-text-content a:hover {
  border-bottom-color: var(--theme-color);
}

.fc-text-content img {
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--fc-border-radius) - 4px);
}

.fc-text-content ul,
.fc-text-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.fc-text-content li {
  margin-bottom: 8px;
}

.fc-text-content code {
  background: var(--bg-secondary, #f1f5f9);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.fc-text-content pre {
  background: var(--bg-secondary, #f1f5f9);
  padding: 16px;
  border-radius: calc(var(--fc-border-radius) - 4px);
  overflow-x: auto;
  margin-bottom: 20px;
}

.fc-text-content pre code {
  background: none;
  padding: 0;
}

.fc-text-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  overflow-x: auto;
  display: block;
}

.fc-text-content th,
.fc-text-content td {
  padding: 12px;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  text-align: left;
}

.fc-text-content th {
  background: var(--bg-secondary, #f1f5f9);
  font-weight: 600;
}

/* ============================================
   引用块样式（美化）
   ============================================ */

.fc-styled-blockquote blockquote {
  position: relative;
  margin: 24px 0;
  padding: 20px 20px 20px 60px;
  background: var(--bg-card);
  border-left: 4px solid var(--theme-color);
  border-radius: 0 var(--fc-border-radius) var(--fc-border-radius) 0;
  font-style: italic;
  box-shadow: var(--fc-shadow);
}

.fc-styled-blockquote blockquote::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 48px;
  color: var(--theme-color);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.fc-styled-blockquote blockquote p {
  margin: 0;
}

.fc-styled-blockquote blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  font-style: normal;
}

/* ============================================
   画廊布局
   ============================================ */

.fc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: var(--fc-gap);
}

.fc-gallery-item {
  position: relative;
  border-radius: var(--fc-border-radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--fc-shadow);
  aspect-ratio: 4 / 3;
}

.fc-gallery-link {
  display: block;
  width: 100%;
  height: 100%;
}

.fc-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fc-gallery-item:hover img {
  transform: scale(1.05);
}

.fc-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  color: #fff;
  font-size: 13px;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.fc-gallery-item:hover .fc-gallery-caption {
  transform: translateY(0);
}

/* ============================================
   图文混合布局
   ============================================ */

.fc-mixed {
  display: flex;
  flex-direction: column;
  gap: var(--fc-gap);
}

.fc-mixed-top-bottom .fc-media-section {
  order: -1;
}

.fc-mixed-bottom-top .fc-text-content {
  order: -1;
}

.fc-mixed-row {
  display: flex;
  gap: var(--fc-gap);
}

.fc-mixed-left-right .fc-media-col {
  flex: 0 0 40%;
}

.fc-mixed-left-right .fc-text-col {
  flex: 1;
}

.fc-mixed-right-left .fc-text-col {
  flex: 1;
}

.fc-mixed-right-left .fc-media-col {
  flex: 0 0 40%;
  order: 1;
}

/* 媒体区块 */
.fc-media-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fc-media-item {
  border-radius: var(--fc-border-radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--fc-shadow);
}

.fc-image-item img {
  width: 100%;
  height: auto;
  display: block;
}

.fc-media-link {
  display: block;
  position: relative;
}

.fc-media-link::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.fc-media-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-30%, -50%) scale(0);
  width: 0;
  height: 0;
  border-left: 14px solid var(--theme-color);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  z-index: 2;
  opacity: 0;
  transition: all 0.3s ease;
}

.fc-media-link:hover::after,
.fc-media-link:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.fc-media-link:hover::before {
  transform: translate(-30%, -50%) scale(1);
}

/* ============================================
   视频样式
   ============================================ */

.fc-video-item {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
}

.fc-video-item video,
.fc-video-item iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.fc-video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: var(--fc-gap);
}

.fc-video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.fc-video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   响应式适配
   ============================================ */

@media (max-width: 1024px) {
  .fc-gallery {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
  
  .fc-video-gallery {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .flexible-content-wrapper {
    --fc-gap: 16px;
    padding: 20px;
  }
  
  .fc-article-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }
  
  .fc-article-title {
    font-size: 22px;
    margin-bottom: 16px;
  }
  
  .fc-article-avatar {
    width: 40px;
    height: 40px;
  }
  
  .fc-article-author-name {
    font-size: 14px;
  }
  
  .fc-article-meta-row {
    gap: 12px;
  }
  
  .fc-article-date,
  .fc-article-views,
  .fc-article-readtime {
    font-size: 12px;
  }
  
  /* 移动端底部模块适配 */
  .fc-copyright {
    margin-top: 32px;
    padding: 16px 20px;
    font-size: 13px;
  }
  
  .fc-tag-list {
    margin-top: 24px;
    padding-top: 20px;
  }
  
  .fc-tag-list__item {
    padding: 5px 12px;
    font-size: 12px;
  }
  
  .fc-article-actions {
    margin-top: 24px;
  }
  
  /* 移动端头部布局适配 - 方案A：横向双栏 */
  .fc-article-header--horizontal {
    flex-direction: column;
    min-height: auto;
  }
  
  .fc-header-image {
    flex: none;
    height: 180px;
  }
  
  .fc-header-content {
    padding: 24px 20px;
    gap: 12px;
  }
  
  .fc-header-title {
    font-size: 22px;
  }
  
  .fc-header-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 12px;
  }
  
  .fc-header-stats {
    width: 100%;
    justify-content: space-between;
  }
  
  /* 移动端头部布局适配 - 方案B：全宽卡片 */
  .fc-article-header--card {
    min-height: 280px;
  }
  
  .fc-header-card-content {
    padding: 32px 20px;
  }
  
  .fc-card-title {
    font-size: 24px;
    margin-bottom: 24px;
  }
  
  .fc-card-bottom {
    flex-direction: column;
    gap: 12px;
  }
  
  .fc-card-divider {
    width: 40px;
    height: 1px;
  }
  
  .fc-card-category {
    padding: 4px 12px;
    font-size: 12px;
  }
  
  .fc-card-tag {
    font-size: 12px;
  }
  
  /* 移动端 AI 摘要适配 */
  .fc-ai-summary {
    margin-bottom: 24px;
    padding: 16px 20px;
  }
  
  .fc-ai-summary__title {
    font-size: 13px;
  }
  
  .fc-ai-summary__content {
    font-size: 13px;
  }
  
  .fc-text-content {
    font-size: 15px;
  }
  
  .fc-text-content h2 {
    font-size: 20px;
  }
  
  .fc-text-content h3 {
    font-size: 18px;
  }
  
  .fc-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .fc-video-gallery {
    grid-template-columns: 1fr;
  }
  
  /* 左右布局在移动端改为上下 */
  .fc-mixed-row {
    flex-direction: column;
  }
  
  .fc-mixed-left-right .fc-media-col,
  .fc-mixed-right-left .fc-media-col {
    flex: none;
    order: -1;
  }
  
  .fc-styled-blockquote blockquote {
    padding: 16px 16px 16px 50px;
  }
  
  .fc-styled-blockquote blockquote::before {
    font-size: 36px;
    left: 16px;
  }
}

@media (max-width: 480px) {
  .fc-gallery {
    grid-template-columns: 1fr;
  }
  
  .fc-gallery-item {
    aspect-ratio: 16 / 10;
  }
}

/* ============================================
   深色模式适配
   ============================================ */

html[data-theme="dark"] .fc-gallery-item,
html[data-theme="dark"] .fc-media-item,
html[data-theme="dark"] .fc-styled-blockquote blockquote {
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .fc-text-content code,
html[data-theme="dark"] .fc-text-content pre {
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .fc-text-content th {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .fc-text-content td,
html[data-theme="dark"] .fc-text-content th {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   主题短代码兼容
   ============================================ */

/* 短代码容器基础样式 */
.fc-text-content [class^="sc-"] {
  margin-bottom: 20px;
}

/* 提示框 c-alert */
.fc-text-content .sc-alert {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--fc-border-radius);
  margin-bottom: 20px;
}

.fc-text-content .sc-alert__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.fc-text-content .sc-alert__content {
  flex: 1;
}

.fc-text-content .sc-alert--info {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid #3b82f6;
}

.fc-text-content .sc-alert--warning {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
}

.fc-text-content .sc-alert--success {
  background: rgba(34, 197, 94, 0.1);
  border-left: 4px solid #22c55e;
}

.fc-text-content .sc-alert--error {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
}

/* 折叠面板 zd-plane */
.fc-text-content .sc-collapse {
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  border-radius: var(--fc-border-radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.fc-text-content .sc-collapse__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-card);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

.fc-text-content .sc-collapse__header:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.02));
}

.fc-text-content .sc-collapse__arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.fc-text-content .sc-collapse--open .sc-collapse__arrow {
  transform: rotate(180deg);
}

.fc-text-content .sc-collapse__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.fc-text-content .sc-collapse--open .sc-collapse__body {
  max-height: 1000px;
}

.fc-text-content .sc-collapse__content {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

/* 按钮 cn_btn */
.fc-text-content .sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: calc(var(--fc-border-radius) - 4px);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.fc-text-content .sc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 下载按钮 c-downbtn */
.fc-text-content .sc-download {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  border-radius: var(--fc-border-radius);
  margin-bottom: 20px;
}

.fc-text-content .sc-download__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.fc-text-content .sc-download__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fc-text-content .sc-download__info {
  flex: 1;
}

.fc-text-content .sc-download__title {
  font-weight: 500;
  margin-bottom: 4px;
}

.fc-text-content .sc-download__source {
  font-size: 13px;
  color: var(--text-secondary);
}

.fc-text-content .sc-download__btn {
  padding: 8px 20px;
  background: var(--theme-color);
  color: #fff;
  border-radius: calc(var(--fc-border-radius) - 4px);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.fc-text-content .sc-download__btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 视频 c-video */
.fc-text-content .sc-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--fc-border-radius);
  background: #000;
  margin-bottom: 20px;
}

.fc-text-content .sc-video__player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 点击显示 clickshow */
.fc-text-content .sc-clickshow {
  border-bottom: 1px dashed var(--theme-color);
  cursor: pointer;
  color: var(--theme-color);
}

.fc-text-content .sc-clickshow--block {
  display: block;
  padding: 16px;
  background: var(--bg-card);
  border: 1px dashed var(--theme-color);
  border-radius: var(--fc-border-radius);
  margin-bottom: 20px;
}

/* 登录可见 loginshow */
.fc-text-content .sc-loginshow {
  padding: 24px;
  background: var(--bg-card);
  border: 2px dashed var(--border-color, rgba(0, 0, 0, 0.1));
  border-radius: var(--fc-border-radius);
  text-align: center;
  margin-bottom: 20px;
}

.fc-text-content .sc-loginshow__note {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.fc-text-content .sc-loginshow__btn {
  padding: 8px 24px;
  background: var(--theme-color);
  color: #fff;
  border: none;
  border-radius: calc(var(--fc-border-radius) - 4px);
  cursor: pointer;
  font-size: 14px;
}

/* 回复可见 reply */
.fc-text-content .sc-replyshow {
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--fc-border-radius);
  margin-bottom: 20px;
}

.fc-text-content .sc-replyshow--hidden {
  text-align: center;
  border: 2px dashed var(--border-color, rgba(0, 0, 0, 0.1));
}

.fc-text-content .sc-replyshow__click {
  color: var(--theme-color);
  cursor: pointer;
  text-decoration: underline;
}

/* 文章卡片 postcard */
.fc-text-content .sc-postcard {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.fc-text-content .sc-postcard--list {
  grid-template-columns: 1fr;
}

.fc-text-content .sc-postcard--card {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.fc-text-content .sc-postcard__item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--fc-border-radius);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

.fc-text-content .sc-postcard__item--card {
  flex-direction: column;
}

.fc-text-content .sc-postcard__thumb-wrap {
  flex-shrink: 0;
  width: 100px;
  height: 75px;
  border-radius: calc(var(--fc-border-radius) - 4px);
  overflow: hidden;
}

.fc-text-content .sc-postcard__item--card .sc-postcard__thumb-wrap {
  width: 100%;
  height: 150px;
}

.fc-text-content .sc-postcard__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fc-text-content .sc-postcard__title {
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

.fc-text-content .sc-postcard__excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 标题面板 title-plane */
.fc-text-content .sc-title-plane {
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  border-radius: var(--fc-border-radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.fc-text-content .sc-title-plane__title {
  padding: 12px 20px;
  background: var(--bg-secondary, #f1f5f9);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

.fc-text-content .sc-title-plane__content {
  padding: 16px 20px;
}

/* 星标面板 star-plane */
.fc-text-content .sc-star-plane {
  position: relative;
  padding: 20px 20px 20px 56px;
  background: var(--bg-card);
  border-radius: var(--fc-border-radius);
  border-left: 4px solid #f59e0b;
  margin-bottom: 20px;
}

.fc-text-content .sc-star-plane::before {
  content: '★';
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 24px;
  color: #f59e0b;
}

/* 密码保护 pwdshow */
.fc-text-content .sc-pwdshow {
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--fc-border-radius);
  text-align: center;
  margin-bottom: 20px;
}

.fc-text-content .sc-pwdshow--locked {
  border: 2px dashed var(--border-color, rgba(0, 0, 0, 0.1));
}

.fc-text-content .sc-pwdshow__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.fc-text-content .sc-pwdshow__form,
.fc-text-content .sc-wxshow__form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 300px;
  margin: 0 auto;
}

.fc-text-content .sc-pwdshow__input,
.fc-text-content .sc-wxshow__input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.2));
  border-radius: calc(var(--fc-border-radius) - 4px);
  background: var(--bg-input, #fff);
  color: var(--text-primary);
}

.fc-text-content .sc-pwdshow__submit,
.fc-text-content .sc-wxshow__submit {
  padding: 8px 20px;
  background: var(--theme-color);
  color: #fff;
  border: none;
  border-radius: calc(var(--fc-border-radius) - 4px);
  cursor: pointer;
}

/* 微信可见 wxshow */
.fc-text-content .sc-wxshow {
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--fc-border-radius);
  text-align: center;
  margin-bottom: 20px;
}

.fc-text-content .sc-wxshow--locked {
  border: 2px dashed var(--border-color, rgba(0, 0, 0, 0.1));
}

.fc-text-content .sc-wxshow__qrcode {
  max-width: 180px;
  margin: 0 auto 16px;
  border-radius: calc(var(--fc-border-radius) - 4px);
}

.fc-text-content .sc-wxshow__desc {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 14px;
}

/* 选择框 selectbox */
.fc-text-content .sc-selectbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 4px;
}

.fc-text-content .sc-selectbox svg {
  width: 100%;
  height: 100%;
  color: var(--text-secondary);
}

.fc-text-content .sc-selectbox--checked svg {
  color: var(--theme-color);
}

/* 深色模式短代码适配 */
html[data-theme="dark"] .fc-text-content .sc-alert--info {
  background: rgba(59, 130, 246, 0.15);
}

html[data-theme="dark"] .fc-text-content .sc-alert--warning {
  background: rgba(245, 158, 11, 0.15);
}

html[data-theme="dark"] .fc-text-content .sc-alert--success {
  background: rgba(34, 197, 94, 0.15);
}

html[data-theme="dark"] .fc-text-content .sc-alert--error {
  background: rgba(239, 68, 68, 0.15);
}

/* ============================================
   动画效果
   ============================================ */

.fc-gallery-item,
.fc-media-item {
  animation: fc-fade-in 0.5s ease-out;
}

@keyframes fc-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 图片懒加载占位 */
.fc-gallery-item img[data-src],
.fc-media-item img[data-src] {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: fc-skeleton-loading 1.5s infinite;
}

@keyframes fc-skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
