/* ==========================================================================
   大象网络专属知识库与教程板块样式 - Liquid Glass / Editorial Reading UX
   ========================================================================== */

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0A84FF, #30D158, #5E5CE6);
  width: 0%;
  z-index: 999;
  transition: width 0.1s ease-out;
}

/* Breadcrumb Navigation */
.breadcrumb-bar {
  padding: 16px 0;
  margin-bottom: 24px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
}

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

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

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

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}

/* Knowledge Hub Layout */
.knowledge-hub-header {
  text-align: center;
  padding: 50px 0 40px;
}

.hub-search-box {
  max-width: 580px;
  margin: 28px auto 0;
  position: relative;
}

.hub-search-input {
  width: 100%;
  padding: 16px 24px 16px 52px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(90, 115, 145, 0.08), inset 0 1px 1px #fff;
  font-size: 15px;
  outline: none;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.hub-search-input:focus {
  background: #FFFFFF;
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 36px rgba(10, 132, 255, 0.16);
}

.hub-search-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
  padding-bottom: 80px;
}

.article-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: rgba(10, 132, 255, 0.4);
}

.article-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.article-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(10, 132, 255, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-read-time {
  font-size: 12px;
  color: var(--text-muted);
}

.article-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.article-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.article-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.article-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* ================= Single Article Reading Layout ================= */
.article-reading-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  padding: 20px 0 90px;
  position: relative;
}

/* Sticky Table of Contents */
.toc-sidebar {
  position: sticky;
  top: 90px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.toc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1.4;
  transition: var(--transition-smooth);
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-cyan);
  background: rgba(10, 132, 255, 0.08);
  font-weight: 600;
}

.toc-cta-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.toc-cta-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
}

/* Article Main Content */
.article-main-body {
  padding: 44px;
  border-radius: var(--radius-lg);
}

.article-header {
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 28px;
}

.article-headline {
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin: 12px 0 16px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Article Prose Typography */
.article-prose {
  font-size: 16px;
  color: #2D3748;
  line-height: 1.85;
}

.article-prose p {
  margin-bottom: 20px;
}

.article-prose h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin: 40px 0 18px;
  letter-spacing: -0.02em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.article-prose h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin: 28px 0 14px;
}

.article-prose ul, .article-prose ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-prose li {
  margin-bottom: 10px;
}

.article-prose strong {
  color: #111827;
  font-weight: 600;
}

/* Callout Boxes */
.article-callout {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  background: rgba(10, 132, 255, 0.06);
  border-left: 4px solid var(--accent-cyan);
}

.article-callout.tip {
  background: rgba(48, 209, 88, 0.06);
  border-left-color: var(--accent-emerald);
}

.article-callout.warning {
  background: rgba(255, 159, 10, 0.08);
  border-left-color: var(--accent-amber);
}

.callout-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* Modern Data Table */
.article-table-wrapper {
  overflow-x: auto;
  margin: 30px 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.article-table th {
  background: rgba(235, 243, 252, 0.8);
  padding: 12px 18px;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.article-table td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

.article-table tr:last-child td {
  border-bottom: none;
}

/* Code Blocks */
.article-code-block {
  margin: 28px 0;
  border-radius: var(--radius-md);
  background: #1E222A;
  color: #ECEFF4;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #181B21;
  font-size: 12px;
  color: #8F9BA8;
  font-family: var(--font-mono);
}

.copy-btn {
  background: transparent;
  border: none;
  color: #8F9BA8;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition-smooth);
}

.copy-btn:hover {
  color: #FFF;
}

.code-content {
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

/* Bottom CTA Banner inside Article */
.article-footer-cta {
  margin-top: 50px;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.08) 0%, rgba(94, 92, 230, 0.08) 100%);
  border: 1px solid rgba(10, 132, 255, 0.25);
  text-align: center;
}

.article-footer-cta h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.article-footer-cta p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 20px;
}

/* Responsive */
@media (max-width: 960px) {
  .article-reading-layout {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    display: none;
  }
  .article-main-body {
    padding: 28px 20px;
  }
}
