/* =================================
   文章阅读页面样式 - page.css
================================= */

/* =================================
   面包屑导航区域
================================= */
.breadcrumb-section {
  background: #f8f9fa;
  padding: 20px 0;
  border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--text-gray);
  text-decoration: none;
  transition: var(--transition);
}

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

.breadcrumb .separator {
  color: #ccc;
}

.breadcrumb .current {
  color: #333;
  font-weight: 500;
}

.breadcrumb .category-link {
  color: var(--primary-color);
  font-weight: 500;
}

/* =================================
   文章主体区域
================================= */
.article-section {
  background: white;
  padding: 40px 0 60px;
}

.article-main {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

/* =================================
   文章头部
================================= */
.article-header {
  padding: 40px 40px 30px;
  border-bottom: 1px solid #f0f0f0;
}

.article-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: bold;
  color: #333;
  line-height: 1.3;
  margin-bottom: 25px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.meta-left,
.meta-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  color: var(--text-gray);
}

.article-meta i {
  font-size: 1rem;
}

.article-meta .category {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  color: white;
}

.category.install {
  background: #28a745;
}

.category.firmware {
  background: #007bff;
}

.category.hardware {
  background: #6f42c1;
}

.category.network {
  background: #17a2b8;
}

.category.troubleshooting {
  background: #dc3545;
}

.category.other {
  background: #6c757d;
}

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

.tag {
  padding: 4px 10px;
  background: #f8f9fa;
  color: var(--text-gray);
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid #e9ecef;
  transition: var(--transition);
}

.tag:hover {
  background: rgba(231, 181, 40, 0.1);
  color: var(--primary-color);
  border-color: rgba(231, 181, 40, 0.3);
}

/* =================================
   文章摘要
================================= */
.article-summary {
  padding: 30px 40px;
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-left: 4px solid var(--primary-color);
  margin-bottom: 0;
}

.article-summary p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  margin: 0;
  font-style: italic;
}

/* =================================
   文章内容
================================= */
.article-content {
  padding: 40px;
  line-height: 1.8;
  font-size: 1rem;
  color: #333;
}

.article-content p img {
  max-width: 100% !important;
  height: auto !important;
}

.article-content img {
  max-width: 100% !important;
  height: auto !important;
}

.article-content p a {
  color: var(--primary-color) !important;
  text-decoration: none;
  transition: var(--transition);
}

.article-content a {
  color: var(--primary-color) !important;
  text-decoration: none;
  transition: var(--transition);
}


.article-content h2 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
  margin: 40px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
  position: relative;
}

.article-content h2::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: #333;
}

.article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin: 30px 0 15px 0;
  position: relative;
  padding-left: 20px;
}

.article-content h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 2px;
}

.article-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin: 25px 0 10px 0;
}

.article-content p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

.article-content li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.article-content strong {
  font-weight: 600;
  color: #333;
}

/* =================================
   提示框样式
================================= */
.notice-box {
  margin: 30px 0;
  padding: 20px;
  border-radius: var(--border-radius);
  border-left: 4px solid;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.notice-box i {
  font-size: 1.5rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.notice-box h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.notice-box p {
  margin: 0;
  line-height: 1.6;
}

.notice-box.warning {
  background: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.notice-box.warning i {
  color: #ffc107;
}

.notice-box.info {
  background: #d1ecf1;
  border-color: #17a2b8;
  color: #0c5460;
}

.notice-box.info i {
  color: #17a2b8;
}

.notice-box.success {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.notice-box.success i {
  color: #28a745;
}

/* =================================
   代码块样式
================================= */
.code-block {
  margin: 30px 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.code-header {
  background: #2d3748;
  color: white;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.copy-btn {
  background: none;
  border: none;
  color: #cbd5e0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.code-block pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 20px;
  margin: 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* =================================
   步骤图片
================================= */
.step-images {
  margin: 30px 0;
  text-align: center;
}

.step-images img {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

/* =================================
   相关链接
================================= */
.related-links {
  margin: 40px 0;
  padding: 25px;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.related-links h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

.related-links ul {
  margin: 0;
  padding-left: 20px;
}

.related-links li {
  margin-bottom: 8px;
}

.related-links a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.related-links a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* =================================
   文章操作区域
================================= */
.article-actions {
  padding: 30px 40px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid #ddd;
  background: white;
  color: var(--text-gray);
  border-radius: 25px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.9rem;
}

.action-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(231, 181, 40, 0.1);
}

.action-btn.liked {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.social-share {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-share span {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.social-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.social-btn:nth-child(2) {
  background: #1aad19;
}

/* WeChat */
.social-btn:nth-child(3) {
  background: #1e6fff;
}

/* QQ */
.social-btn:nth-child(4) {
  background: #000;
}

/* Twitter/X */
.social-btn:nth-child(5) {
  background: #4267b2;
}

/* Facebook */

.social-btn:hover {
  transform: scale(1.1);
}

/* =================================
   文章导航
================================= */
.article-navigation {
  padding: 30px 40px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: #f8f9fa;
  color: var(--text-gray);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: 1px solid #e9ecef;
}

.nav-btn:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.nav-btn.back-btn {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.nav-btn.back-btn:hover {
  background: var(--primary-hover);
}

.nav-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =================================
   评论区域
================================= */
.comments-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.comments-header {
  padding: 25px 30px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comments-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
}

.comment-count {
  color: var(--primary-color);
}

.comment-sort .layui-input {
  width: 120px;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
}

/* =================================
   评论表单
================================= */
.comment-form {
  padding: 30px;
  border-bottom: 1px solid #f0f0f0;
}

.form-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 500;
  color: #333;
}

.comment-form-body .layui-textarea {
  min-height: 120px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 15px;
  resize: vertical;
  margin-bottom: 15px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.submit-comment-btn {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #000 !important;
}

/* =================================
   评论列表
================================= */
.comments-list {
  padding: 0 30px 30px;
}

.comment-item {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f8f9fa;
}

.comment-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.comment-avatar img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 600;
  color: #333;
}

.admin-badge {
  background: var(--primary-color);
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.comment-date {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.comment-text {
  line-height: 1.7;
  margin-bottom: 15px;
  color: #333;
}

.comment-actions {
  display: flex;
  gap: 20px;
}

.comment-actions .action-btn {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 15px;
}

/* =================================
   评论回复
================================= */
.comment-replies {
  margin-top: 20px;
  padding-left: 20px;
  border-left: 2px solid #f0f0f0;
}

.comment-item.reply {
  margin-bottom: 20px;
}

.comment-item.reply .comment-avatar img {
  width: 35px;
  height: 35px;
}

/* =================================
   加载更多评论
================================= */
.load-more-comments {
  text-align: center;
  padding: 20px 30px;
}

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

.sidebar-widget {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.widget-title {
  background: #f8f9fa;
  padding: 20px 25px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e9ecef;
}

/* =================================
   目录导航
================================= */
.toc-content {
  padding: 25px;
}

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

.toc-list li {
  margin-bottom: 8px;
}

.toc-list a {
  color: var(--text-gray);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
  line-height: 1.5;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--primary-color);
  font-weight: 500;
}

.toc-list ul {
  list-style: none;
  padding-left: 20px;
  margin-top: 5px;
}

.toc-list ul a {
  font-size: 0.85rem;
  color: #999;
}

/* =================================
   相关文章侧边栏
================================= */
.related-articles {
  padding: 25px;
}

.related-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

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

.related-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.related-content {
  flex: 1;
}

.related-content h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.related-content a {
  color: #333;
  text-decoration: none;
  transition: var(--transition);
}

.related-content a:hover {
  color: var(--primary-color);
}

.related-date {
  color: var(--text-gray);
  font-size: 0.8rem;
}

/* =================================
   标签云
================================= */
.tags-cloud {
  padding: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  padding: 6px 12px;
  background: #f8f9fa;
  color: var(--text-gray);
  border-radius: 15px;
  text-decoration: none;
  font-size: 0.8rem;
  transition: var(--transition);
  border: 1px solid #e9ecef;
}

.tag-item:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

/* =================================
   技术支持
================================= */
.support-content {
  padding: 25px;
}

.support-content p {
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--text-gray);
}

.support-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: #f8f9fa;
  color: var(--text-gray);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: 1px solid #e9ecef;
}

.support-btn:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.support-btn i {
  font-size: 1.1rem;
}

/* =================================
   响应式设计
================================= */
@media (max-width: 991px) {
  .sidebar {
    margin-top: 40px;
  }
}

@media (max-width: 768px) {
  .article-header {
    padding: 30px 25px 20px;
  }

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

  .article-meta {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .meta-left,
  .meta-right {
    gap: 15px;
    flex-wrap: wrap;
  }

  .article-summary {
    padding: 25px;
  }

  .article-content {
    padding: 25px;
  }


  .article-content p img {
    max-width: 100% !important;
    height: auto !important;
  }

  .article-content img {
    max-width: 100% !important;
    height: auto !important;
  }

  .article-actions {
    padding: 25px;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .action-buttons {
    justify-content: center;
  }

  .social-share {
    justify-content: center;
  }

  .article-navigation {
    padding: 25px;
    flex-direction: column;
    gap: 15px;
  }

  .nav-btn {
    justify-content: center;
  }

  .nav-title {
    max-width: none;
  }

  .comments-header {
    padding: 20px 25px;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .comment-form {
    padding: 25px;
  }

  .comments-list {
    padding: 0 25px 25px;
  }

  .support-options {
    gap: 8px;
  }

  .support-btn {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .breadcrumb {
    flex-wrap: wrap;
    font-size: 0.8rem;
  }

  .article-header {
    padding: 25px 20px 15px;
  }

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

  .article-summary {
    padding: 20px;
  }

  .article-content {
    padding: 20px;
  }

  .article-content p img {
    max-width: 100% !important;
    height: auto !important;
  }

  .article-content img {
    max-width: 100% !important;
    height: auto !important;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .article-content h3 {
    font-size: 1.3rem;
  }

  .notice-box {
    padding: 15px;
    gap: 10px;
  }

  .code-header {
    padding: 10px 15px;
  }

  .code-block pre {
    padding: 15px;
  }

  .article-actions {
    padding: 20px;
  }

  .action-buttons {
    gap: 10px;
  }

  .action-btn {
    padding: 8px 15px;
    font-size: 0.8rem;
  }

  .article-navigation {
    padding: 20px;
  }

  .comments-header {
    padding: 15px 20px;
  }

  .comment-form {
    padding: 20px;
  }

  .comments-list {
    padding: 0 20px 20px;
  }

  .comment-item {
    gap: 10px;
  }

  .widget-title {
    padding: 15px 20px;
  }

  .toc-content,
  .related-articles,
  .tags-cloud,
  .support-content {
    padding: 20px;
  }
}



.iframe-container {
  position: relative;
  margin: 20px 0;
}

.iframe-maximize-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.iframe-maximize-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}