/* ========================================
   文章详情页样式 - Article Detail Styles
   ======================================== */

:root {
  --article-primary: #2B6DE8;
  --article-primary-light: #5B8DEF;
  --article-primary-dark: #1E5AC7;
  --article-text: #1e293b;
  --article-text-secondary: #64748b;
  --article-text-muted: #94a3b8;
  --article-bg: #f8fafc;
  --article-border: #e2e8f0;
  --article-white: #ffffff;
}

/* ========== Hero Section ========== */
.article-hero {
  position: relative;
  padding: 50px 0 40px;
  margin-top: 70px;
  background: linear-gradient(135deg, #2B6DE8 0%, #6366F1 50%, #8B5CF6 100%);
  overflow: hidden;
}

.article-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.article-hero-content {
  flex: 1;
  text-align: left;
}

.article-hero-illustration {
  flex-shrink: 0;
  width: 280px;
  height: 220px;
}

.article-hero-illustration svg {
  width: 100%;
  height: 100%;
}

.article-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.article-hero .hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.article-hero .hero-circle-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  right: -80px;
  animation: articleFloat 10s ease-in-out infinite;
}

.article-hero .hero-circle-2 {
  width: 200px;
  height: 200px;
  bottom: -60px;
  left: -60px;
  animation: articleFloat 12s ease-in-out infinite reverse;
}

.article-hero .hero-circle-3 {
  width: 100px;
  height: 100px;
  top: 50%;
  left: 20%;
  animation: articleFloat 8s ease-in-out infinite;
}

.article-hero .hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes articleFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-15px) scale(1.02); }
}

.article-hero .container {
  position: relative;
  z-index: 2;
}

.article-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.article-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.4;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.article-hero-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

/* ========== 面包屑 ========== */
.article-breadcrumb {
  background: var(--article-white);
  border-bottom: 1px solid var(--article-border);
  padding: 16px 0;
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--article-text-secondary);
}

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

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

.breadcrumb-inner span {
  color: var(--article-text-muted);
}

/* ========== 文章内容区 ========== */
.article-content {
  padding: 40px 0 80px;
  background: var(--article-bg);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== 文章主体 ========== */
.article-main {
  background: var(--article-white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.article-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--article-border);
}

.article-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--article-text);
  margin: 0 0 16px;
  line-height: 1.4;
}

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

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--article-text-secondary);
}

.meta-item svg {
  color: var(--article-text-muted);
}

.article-body {
  font-size: 16px;
  line-height: 1.9;
  color: #374151;
}

.article-body h1, 
.article-body h2, 
.article-body h3, 
.article-body h4 {
  color: var(--article-text);
  margin: 30px 0 15px;
  font-weight: 600;
}

.article-body h2 { font-size: 24px; }
.article-body h3 { font-size: 20px; }
.article-body h4 { font-size: 18px; }

.article-body p {
  margin: 0 0 16px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.article-body a {
  color: var(--article-primary);
  text-decoration: none;
}

.article-body a:hover {
  text-decoration: underline;
}

.article-body ul, 
.article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: #f1f5f9;
  border-left: 4px solid var(--article-primary);
  border-radius: 0 8px 8px 0;
  color: #475569;
}

.article-body pre, 
.article-body code {
  font-family: 'Consolas', 'Monaco', monospace;
  background: #f1f5f9;
  border-radius: 6px;
}

.article-body code {
  padding: 2px 6px;
  font-size: 14px;
}

.article-body pre {
  padding: 16px;
  overflow-x: auto;
}

.article-body pre code {
  padding: 0;
  background: none;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.article-body th, 
.article-body td {
  padding: 12px 15px;
  border: 1px solid var(--article-border);
  text-align: left;
}

.article-body th {
  background: var(--article-bg);
  font-weight: 600;
}

/* ========== 文章底部 ========== */
.article-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--article-border);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--article-bg);
  border-radius: 12px;
}

.article-share-label {
  font-size: 14px;
  color: var(--article-text-secondary);
  white-space: nowrap;
}

.article-share-link {
  flex: 1;
  padding: 10px 14px;
  background: var(--article-white);
  border: 1px solid var(--article-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--article-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-share-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--article-primary), var(--article-primary-light));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.article-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 109, 232, 0.3);
}

/* ========== 侧边栏 ========== */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--article-white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--article-text);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--article-primary);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin-bottom: 8px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.sidebar-menu a:before {
  content: '';
  width: 6px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 50%;
  transition: all 0.2s;
}

.sidebar-menu a:hover {
  background: #f1f5f9;
  color: var(--article-primary);
}

.sidebar-menu a:hover:before {
  background: var(--article-primary);
}

/* ========== 返回按钮 ========== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--article-white);
  border: 1px solid var(--article-border);
  border-radius: 10px;
  color: var(--article-text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--article-primary);
  color: var(--article-primary);
}

/* ========== 分类导航 ========== */
.article-nav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 60px;
  z-index: 100;
}

.article-nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  overflow-x: auto;
}

.article-nav-item {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.article-nav-item:hover {
  background: #f1f5f9;
  color: #3b82f6;
}

.article-nav-item.active {
  background: linear-gradient(135deg, var(--article-primary), var(--article-primary-light));
  color: #fff;
}

/* ========== 文章列表 ========== */
.article-list {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.article-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.article-list-title {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.article-item {
  padding: 24px 0;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s;
}

.article-item:last-child {
  border-bottom: none;
}

.article-item:hover {
  padding-left: 10px;
}

.article-item-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 12px;
  line-height: 1.5;
}

.article-item-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.article-item-title a:hover {
  color: var(--article-primary);
}

.article-item-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.8;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-item-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #94a3b8;
}

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

/* ========== 分页 ========== */
.article-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
}

.article-pagination a,
.article-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}

.article-pagination a {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #64748b;
}

.article-pagination a:hover {
  border-color: var(--article-primary);
  color: var(--article-primary);
}

.article-pagination span.current {
  background: linear-gradient(135deg, var(--article-primary), var(--article-primary-light));
  color: #fff;
  border: none;
}

.article-pagination span.disabled {
  background: #f1f5f9;
  color: #cbd5e1;
  cursor: not-allowed;
}

/* ========== 空状态 ========== */
.article-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.article-empty svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* ========== 列表页侧边栏 ========== */
.article-sidebar-list {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  height: fit-content;
  position: sticky;
  top: 130px;
}

.article-sidebar-list .sidebar-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--article-primary);
}

.article-sidebar-list .sidebar-menu a.active {
  background: linear-gradient(135deg, rgba(43,109,232,0.1), rgba(91,141,239,0.1));
  color: var(--article-primary);
  font-weight: 500;
}

.article-sidebar-list .sidebar-menu a.active:before {
  background: var(--article-primary);
}

/* ========== 列表页布局 ========== */
.article-layout-list {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

/* ========== 响应式 ========== */
@media (max-width: 968px) {
  .article-layout,
  .article-layout-list { 
    grid-template-columns: 1fr; 
  }
  .article-hero {
    padding: 40px 0 30px;
  }
  .article-hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .article-hero-content {
    text-align: center;
  }
  .article-hero-illustration {
    display: none;
  }
  .article-hero-features {
    justify-content: center;
  }
  .article-hero-title { 
    font-size: 22px; 
  }
  .article-main { 
    padding: 24px; 
  }
  .article-title {
    font-size: 22px;
  }
  .article-meta {
    gap: 16px;
  }
  .article-share {
    flex-direction: column;
    align-items: stretch;
  }
  .article-share-link {
    text-align: center;
  }
  .article-sidebar-list {
    position: static;
  }
  .article-nav-inner {
    padding: 12px 0;
  }
  .article-list {
    padding: 20px;
  }
}

