/* ========================================
   Article Page Styles
======================================== */

.article-page {
  padding-top: 80px;
}

/* Article Header / Banner - Left-Right Layout */
.article-header {
  padding: 80px 0;
  position: relative;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.08) 0%, rgba(20, 30, 45, 0.3) 100%);
  overflow: hidden;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

[data-theme="light"] .article-header {
  background: linear-gradient(180deg, rgba(0, 153, 204, 0.08) 0%, rgba(240, 240, 245, 0.5) 100%);
}

.article-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(60px);
}

[data-theme="light"] .article-header::before {
  background: radial-gradient(circle, rgba(0, 153, 204, 0.12) 0%, transparent 70%);
}

.article-header .container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.article-header-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.article-header-content {
  max-width: 700px;
}

.article-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--accent-gradient);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.article-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #c0c0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .article-title {
  background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.article-meta-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.3);
}

.article-meta-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  color: var(--primary-color);
}

/* Header Image */
.article-header-image {
  width: 400px;
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
}

.article-header-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

.article-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.article-header-image:hover img {
  transform: scale(1.05);
}

/* Article Layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.article-content {
  min-width: 0;
  background: rgba(25, 35, 50, 0.5);
  border-radius: 24px;
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .article-content {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Article Body Content */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .article-body {
  color: #1a1a1a;
}

.article-body h2 {
  color: var(--text-primary);
  margin: 3rem 0 1.5rem;
  font-size: 1.875rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.article-body h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.article-body h3 {
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.article-body p {
  /* margin-bottom: 1.5rem; */
  line-height: 1.2 !important;
}

.MsoNormal span {

  
  font-size: 17px !important;
  word-spacing: 4px;

}

.article-body p:first-of-type {
  font-size: 1.1875rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
}

[data-theme="light"] .article-body p:first-of-type {
  color: #2a2a2a;
}

.article-body ul,
.article-body ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.875rem;
  list-style: none;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.8;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
}

.article-body ol {
  counter-reset: item;
}

.article-body ol li {
  counter-increment: item;
}

.article-body ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
}

.article-body blockquote {
  margin: 2.5rem 0;
  padding: 2rem 2rem 2rem 3rem;
  background: rgba(0, 212, 255, 0.08);
  border-left: 4px solid var(--primary-color);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
}

[data-theme="light"] .article-body blockquote {
  background: rgba(0, 153, 204, 0.08);
  color: #2a2a2a;
  border-left-color: var(--accent-color);
}

.article-body blockquote::before {
  content: '"';
  position: absolute;
  top: 1.5rem;
  left: 0.75rem;
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.article-body img {
  width: 100%;
  border-radius: 12px;
  margin: 2.5rem 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-body img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.article-image-caption {
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
  padding: 0 2rem;
  line-height: 1.6;
}

[data-theme="light"] .article-image-caption {
  color: #666666;
}

.article-body a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
  padding-bottom: 1px;
}

.article-body a:hover {
  border-bottom-color: var(--primary-color);
  color: #00d4ff;
}

.article-body code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--primary-color);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

[data-theme="light"] .article-body code {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent-color);
  border: 1px solid rgba(0, 153, 204, 0.3);
}

.article-body pre {
  background: rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .article-body pre {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.article-body strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

[data-theme="light"] .article-body strong {
  color: #1a1a1a;
  font-weight: 700;
}

.article-body em {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .article-body em {
  color: #2a2a2a;
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: rgba(25, 35, 50, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

[data-theme="light"] .sidebar-widget {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-widget:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.15);
}

.sidebar-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Table of Contents */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 0.75rem;
}

.toc-link {
  display: block;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  position: relative;
}

[data-theme="light"] .toc-link {
  color: #4a4a4a;
  border-left-color: rgba(0, 0, 0, 0.15);
}

.toc-link:hover {
  color: var(--text-primary);
  border-left-color: var(--primary-color);
  padding-left: 1rem;
  background: rgba(0, 212, 255, 0.08);
}

[data-theme="light"] .toc-link:hover {
  background: rgba(0, 153, 204, 0.08);
}

.toc-link.active {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  background: rgba(0, 212, 255, 0.1);
  font-weight: 500;
}

[data-theme="light"] .toc-link.active {
  color: var(--accent-color);
  border-left-color: var(--accent-color);
  background: rgba(0, 153, 204, 0.1);
}

/* Related Articles */
.related-article {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.related-article:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-article:first-child {
  padding-top: 0;
}

.related-article:hover {
  transform: translateX(4px);
}

.related-article-image {
  width: 90px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.related-article-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.related-article:hover .related-article-image::after {
  opacity: 1;
}

.related-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-article:hover .related-article-image img {
  transform: scale(1.1);
}

.related-article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.related-article-content h4 {
  font-size: 0.75rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* -webkit-box-orient: vertical; */
  overflow: hidden;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.related-article:hover .related-article-content h4 {
  color: #00d4ff;
}

.related-article-content span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .article-header-layout {
    grid-template-columns: 1fr 350px;
    gap: 3rem;
  }

  .article-header-image {
    width: 350px;
    height: 350px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .sidebar-widget {
    margin-bottom: 0;
  }

  /* 移动端目录导航优化 */
  .toc-list {
    max-height: 300px;
    overflow-y: auto;
  }

  .toc-list::-webkit-scrollbar {
    width: 4px;
  }

  .toc-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
  }

  .toc-list::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 2px;
  }

  .toc-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
  }
}

@media (max-width: 768px) {
  .article-page {
    padding-top: 60px;
  }

  .article-header {
    padding: 60px 0;
  }

  .article-header-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-header-image {
    width: 100%;
    height: 300px;
    order: -1;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-description {
    font-size: 1rem;
  }

  .article-layout {
    padding: 0 1.5rem 3rem;
    gap: 2rem;
  }

  .article-content {
    padding: 1rem;
  }

  .article-meta {
    gap: 1rem;
  }

  .article-meta-item {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .article-body {
    font-size: 1rem;
    line-height: 1 !important;
  }

  .article-body p:first-of-type {
    font-size: 1.05rem;
  }

  .article-body h2 {
    font-size: 1.2rem;
    margin: 2.5rem 0 1rem;
  }

  .article-body h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
  }

  .article-body blockquote {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  .sidebar-widget {
    padding: 1.5rem;
  }

  .article-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .article-header {
    padding: 40px 0;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-description {
    font-size: 0.95rem;
  }

  .article-header-image {
    height: 250px;
  }

  .article-layout {
    padding: 0 0rem 2rem;
  }

  .article-body {
    font-size: 0.95rem;
  }

  .article-body h2 {
    font-size: 1.35rem;
  }

  .article-body h3 {
    font-size: 1.15rem;
  }

  .article-image-caption {
    padding: 0 1rem;
    font-size: 0.85rem;
  }
}

/* ========================================
   Comparison Table Styles
======================================== */

.comparison-table {
  margin: 2rem 0;
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 600px;
  /* 确保表格在小屏幕上可以滚动 */
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.comparison-table th {
  background: var(--primary-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table th:first-child {
  border-top-left-radius: 12px;
  width: 25%;
  font-weight: 700;
}

.comparison-table th:last-child {
  border-top-right-radius: 12px;
}

.comparison-table td {
  color: var(--text-secondary);
  line-height: 1.5;
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.05);
}

.comparison-table tr:hover {
  background: rgba(0, 212, 255, 0.03);
}

.comparison-table tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.comparison-table tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

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

/* 移动端表格样式 */
@media (max-width: 768px) {
  .comparison-table {
    margin: 1.5rem -1rem;
    /* 扩展到容器边缘 */
    border-radius: 0;
    box-shadow: none;
    border-left: none;
    border-right: none;
  }

  .comparison-table table {
    min-width: 500px;
    /* 减小最小宽度 */
    font-size: 0.9rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 1rem;
  }

  .comparison-table th {
    font-size: 0.8rem;
  }

  /* 添加滚动提示 */
  .comparison-table::after {
    content: "← 滑动查看更多 →";
    display: block;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
  }
}

@media (max-width: 480px) {
  .comparison-table {
    margin: 1.5rem -0.5rem;
  }

  .comparison-table table {
    min-width: 450px;
    font-size: 0.85rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.6rem 0.8rem;
  }

  .comparison-table th {
    font-size: 0.75rem;
  }
}

/* 深色主题表格样式 */
[data-theme="dark"] .comparison-table {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .comparison-table th {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .comparison-table td:first-child {
  background: rgba(0, 212, 255, 0.08);
}

[data-theme="dark"] .comparison-table tr:hover {
  background: rgba(0, 212, 255, 0.05);
}

/* 浅色主题表格样式 */
[data-theme="light"] .comparison-table {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .comparison-table th {
  background: rgba(0, 153, 204, 0.1);
  color: #1a1a1a;
}

[data-theme="light"] .comparison-table td {
  color: #4a4a4a;
}

[data-theme="light"] .comparison-table td:first-child {
  color: #1a1a1a;
  background: rgba(0, 153, 204, 0.05);
}

[data-theme="light"] .comparison-table tr:hover {
  background: rgba(0, 153, 204, 0.03);
}