/* ══════════════════════════════════════════════════════════════════════════
   📖 平台使用指南与操作手册 (Guide View & Knowledge Base) 专属设计系统
   ══════════════════════════════════════════════════════════════════════════ */

.guide-view-container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 16px 60px;
}

.guide-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 1. 顶部 Header 卡片 (极简流线型) */
.guide-header-card {
  background: linear-gradient(135deg, #064E3B 0%, #0D231A 100%);
  border-radius: 12px;
  padding: 14px 16px;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(6, 78, 59, 0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.guide-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.guide-header-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-header-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #A7F3D0;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.guide-header-back-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.guide-header-back-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.guide-search-bar {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  gap: 6px;
}

.guide-search-icon {
  font-size: 14px;
  color: #94A3B8;
}

.guide-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #1E293B;
  background: transparent;
}

.guide-search-input::placeholder {
  color: #94A3B8;
  font-size: 12.5px;
}

.guide-search-clear {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}

/* 2. 二级分类导航胶囊条 */
.guide-cat-tabs-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.guide-cat-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.guide-cat-tabs {
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.guide-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.guide-cat-tab:hover {
  border-color: #CBD5E1;
  color: #0F172A;
  background: #F8FAFC;
}

.guide-cat-tab.active {
  background: #064E3B;
  color: #FFFFFF;
  border-color: #064E3B;
  box-shadow: 0 3px 10px rgba(6, 78, 59, 0.25);
}

/* 3. 文章卡片列表网格 (极致紧凑轻量流线型设计) */
.guide-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .guide-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
  }
}

.guide-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  user-select: none;
}

.guide-card:hover {
  border-color: #10B981;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.09);
}

.guide-card:active {
  background: #F8FAFC;
  transform: scale(0.995);
}

/* 左侧专属图标色块 */
.guide-card-icon-box {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* 中间主信息区 */
.guide-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guide-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-card-summary {
  font-size: 12px;
  color: #64748B;
  line-height: 1.35;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94A3B8;
  margin-top: 3px;
}

.guide-card-cat-name {
  color: #047857;
  font-weight: 600;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10.5px;
}

.guide-card-views {
  font-size: 11px;
  color: #94A3B8;
}

.guide-card-media-tag {
  color: #2563EB;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.guide-card-media-tag.video {
  color: #D97706;
  background: #FFFBEB;
  border-color: #FDE68A;
}

/* 右侧快捷按钮与箭头 */
.guide-card-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.guide-card-copy-btn {
  background: #F1F5F9;
  border: none;
  color: #64748B;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.guide-card-copy-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: scale(1.08);
}

.guide-card-copy-btn:active {
  transform: scale(0.92);
}

.guide-card-arrow {
  font-size: 18px;
  color: #CBD5E1;
  line-height: 1;
  font-weight: 300;
}

/* 4. 文章详情页 */
.guide-detail-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.guide-nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.guide-nav-back-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.guide-nav-back-btn .back-arrow {
  font-size: 18px;
  line-height: 1;
}

.guide-nav-center-tag {
  font-size: 12px;
  font-weight: 600;
  color: #047857;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.guide-nav-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #059669;
  color: #FFFFFF;
  border: none;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
  transition: all 0.15s ease;
}

.guide-nav-share-btn:hover {
  background: #047857;
  transform: translateY(-1px);
}

.guide-article-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.guide-article-header {
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.guide-article-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.4;
  margin-bottom: 8px;
}

.guide-article-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.guide-article-meta {
  font-size: 11.5px;
  color: #94A3B8;
}

.guide-summary-callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #F8FAFC;
  border-left: 3px solid #059669;
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
}

.guide-summary-callout .callout-icon {
  font-size: 14px;
  flex-shrink: 0;
}

/* 5. 正文 Markdown 渲染样式 */
.guide-article-content {
  font-size: 15px;
  color: #334155;
  line-height: 1.8;
}

.guide-article-content .guide-h1,
.guide-article-content .guide-h2 {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 22px 0 10px;
}

.guide-article-content .guide-h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-article-content .guide-h3 .h3-bar {
  width: 4px;
  height: 16px;
  background: #059669;
  border-radius: 2px;
  display: inline-block;
}

.guide-article-content .guide-h4 {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin: 16px 0 8px;
}

.guide-article-content .guide-p {
  margin-bottom: 12px;
}

.guide-article-content .guide-hr {
  border: none;
  border-top: 1px dashed #E2E8F0;
  margin: 24px 0;
}

.guide-article-content .guide-ul,
.guide-article-content .guide-ol {
  margin: 10px 0 16px 20px;
}

.guide-article-content li {
  margin-bottom: 6px;
}

.guide-article-content strong {
  color: #0F172A;
  font-weight: 700;
}

.guide-article-content .guide-code {
  background: #F1F5F9;
  color: #D97706;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13.5px;
  font-weight: 600;
}

.guide-article-content .guide-link {
  color: #2563EB;
  text-decoration: none;
  font-weight: 600;
}

.guide-article-content .guide-paragraph-gap {
  height: 8px;
}

/* 🖼️ 正文内嵌图解卡片 (Markdown 图片) */
.guide-md-img-card {
  margin: 18px auto 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.guide-md-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-md-img-wrap:hover {
  transform: translateY(-2px);
  border-color: #10B981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}

.guide-md-img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  margin: 0 auto;
}

.guide-md-img-caption {
  font-size: 12.5px;
  color: #64748B;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  padding: 0 8px;
}

/* 6. 多图画廊与视频 */
.guide-media-gallery,
.guide-video-wrap {
  margin: 24px 0;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
}

.guide-media-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 12px;
}

.guide-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.guide-gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #CBD5E1;
  background: #000;
  cursor: pointer;
}

.guide-gallery-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

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

.guide-gallery-zoom-tag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #FFFFFF;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* 7. 直达操作引导卡片 */
/* 7. 直达操作引导卡片 (轻量精简) */
.guide-action-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 20px;
  gap: 10px;
}

.guide-action-text-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.guide-action-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.guide-action-btn {
  background: #059669;
  border-color: #059669;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 8. 翻页极简左右胶囊导航 */
.guide-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border-top: 1px solid #F1F5F9;
  padding-top: 14px;
  margin-top: 20px;
  gap: 10px;
}

.guide-page-btn {
  flex: 1;
  min-width: 0;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.guide-page-btn.next {
  text-align: right;
  align-items: flex-end;
}

.guide-page-btn:hover:not(.disabled) {
  background: #FFFFFF;
  border-color: #10B981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
  transform: translateY(-1px);
}

.guide-page-btn:active:not(.disabled) {
  transform: scale(0.99);
}

.guide-page-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #F8FAFC;
  border-style: dashed;
  justify-content: center;
}

.guide-page-btn .page-dir {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
}

.guide-page-btn.disabled .page-dir {
  color: #94A3B8;
  font-weight: normal;
}

.guide-page-btn .page-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 9. 底部求助与空状态 (极简轻量通栏) */
.guide-help-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.guide-help-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.guide-help-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.guide-help-text {
  font-size: 12px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-help-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.guide-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px dashed #CBD5E1;
}

/* 📱 移动端小屏响应式适配 */
@media (max-width: 768px) {
  .guide-view-container {
    padding: 12px 12px 60px;
  }
  .guide-header-card {
    padding: 18px 14px 14px;
  }
  .guide-header-title {
    font-size: 18px;
  }
  .guide-cards-grid {
    grid-template-columns: 1fr;
  }
  .guide-article-card {
    padding: 20px 14px;
  }
  .guide-article-title {
    font-size: 19px;
  }
  .guide-action-card {
    flex-direction: column;
    align-items: stretch;
  }
  .guide-action-btn {
    width: 100%;
    text-align: center;
  }
}
