* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  color: unset;
  text-decoration: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Header */
.header {
  background: linear-gradient(90deg, #2d3748 0%, #1a202c 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.logo-badge {
  background: #ff6b35;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.header-title {
  margin-left: 32px;
  padding-left: 32px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
}

.header-title a {
  color: white;
  text-decoration: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 80px 20px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.search-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.search-input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  outline: none;
  font-size: 15px;
}

.search-button {
  background: #ff8a50;
  color: white;
  border: none;
  padding: 16px 32px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.3s;
}

.search-button:hover {
  background: #ff7035;
}

/* Hot Articles */
.hot-articles {
  padding: 48px 20px;
  background: white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-more {
  font-size: 14px;
  color: #4a90e2;
  cursor: pointer;
  font-weight: normal;
}

.article-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.article-link {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  color: #555;
}

.article-link:hover {
  background: #e9ecef;
}

/* Categories */
.categories {
  padding: 48px 20px 80px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: inherit;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-title {
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 600;
}

.category-links {
  list-style: none;
  margin-bottom: 16px;
}

.category-links li {
  margin-bottom: 10px;
}

.category-links a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  display: block;
}

.category-links a:hover {
  color: #4a90e2;
}

.view-more-link {
  color: #4a90e2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

/* Footer */
.footer {
  background: #2d3748;
  color: #a0aec0;
  text-align: center;
  padding: 32px 20px;
  font-size: 13px;
}

/* Search Bar (List & Detail Pages) */
.search-bar-container {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 20px;
}

.search-bar {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
}

.search-input-small {
  flex: 1;
  max-width: 600px;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  font-size: 14px;
}

.search-button-small {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

/* Main Container (List & Detail Pages) */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  background: white;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: #f8f9fa;
  border-right: 1px solid #e0e0e0;
  min-height: calc(100vh - 0px);
  position: sticky;
  top: 64px;
  height: fit-content;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.back-link {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-nav {
  padding: 8px 0;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-item {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #333;
  transition: background 0.2s;
}

.nav-item:hover {
  background: #e9ecef;
}

.nav-item.active {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
}

.arrow {
  font-size: 10px;
  transition: transform 0.2s;
}

.nav-item.active .arrow {
  transform: rotate(180deg);
}

.submenu {
  display: none;
  list-style: none;
  padding: 4px 0;
  background: white;
}

.active-section .submenu {
  display: block;
}

.submenu-item {
  padding: 8px 20px 8px 40px;
  font-size: 13px;
}

.submenu-item a {
  color: #666;
  text-decoration: none;
  display: block;
}

.submenu-item:hover {
  background: #f5f5f5;
}

.submenu-item.active {
  background: #e3f2fd;
}

.submenu-item.active a {
  color: #1976d2;
  font-weight: 500;
}

/* Content Area */
.content {
  flex: 1;
  padding: 32px 40px;
}

.breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.page-title {
  font-size: 28px;
  margin-bottom: 32px;
  font-weight: 600;
}

/* Article List */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.article-item:hover {
  border-color: #4a90e2;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.article-title {
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 500;
}

.article-meta {
  font-size: 13px;
  color: #999;
}

.article-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  opacity: 0.3;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  /* border-top: 1px solid #e0e0e0; */
}

.page-info {
  font-size: 13px;
  color: #666;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-size-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.page-size-btn.active {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.page-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  min-width: 36px;
}

.page-btn:hover {
  border-color: #4a90e2;
  color: #4a90e2;
}

.page-btn.active {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.page-jump {
  font-size: 13px;
  color: #666;
  margin-left: 8px;
}

.page-input {
  width: 50px;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  margin: 0 4px;
}

/* Article Detail */
.article-detail {
  position: relative;
}

.article-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.article-detail-title {
  font-size: 28px;
  font-weight: 600;
  flex: 1;
}

.article-views {
  background: #f5f5f5;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #666;
}

.article-meta-section {
  font-size: 13px;
  color: #999;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

/* Table of Contents Sidebar */
.toc-sidebar {
  float: right;
  width: 240px;
  margin-left: 32px;
  margin-bottom: 24px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  position: sticky;
  top: 100px;
}

.toc-sidebar h3 {
  font-size: 15px;
  margin-bottom: 12px;
  font-weight: 600;
}

.toc-content {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
}

.toc-content p {
  margin-bottom: 8px;
}

.toc-list {
  list-style: none;
}

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

.toc-link {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}

.toc-link:hover {
  color: #4a90e2;
}

.toc-link.active {
  color: #4a90e2;
  font-weight: 500;
}

/* Article Body */
.article-body {
  font-size: 15px;
  line-height: 1.8;
}

.article-body h2 {
  font-size: 20px;
  margin-top: 40px;
  margin-bottom: 16px;
  font-weight: 600;
}

.article-body h4 {
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 500;
}

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

.article-body ol {
  margin-left: 24px;
  margin-bottom: 16px;
}

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

.warning-box {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 4px;
}

.warning-box strong {
  color: #e65100;
  display: block;
  margin-bottom: 8px;
}

.note-box {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 4px;
}

.screenshot {
  margin: 24px 0;
}

.faq-item {
  margin: 24px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}

/* Article Footer Navigation */
.article-footer-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
  gap: 24px;
}

.prev-article,
.next-article {
  flex: 1;
}

.nav-label {
  font-size: 13px;
  color: #999;
}

.article-footer-nav a {
  color: #4a90e2;
  text-decoration: none;
  font-size: 14px;
}

.next-article {
  text-align: right;
}

/* Feedback Section */
.feedback-section {
  margin-top: 48px;
  padding: 32px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.feedback-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.feedback-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.feedback-btn {
  padding: 10px 24px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.feedback-btn:hover {
  border-color: #4a90e2;
  color: #4a90e2;
}

.feedback-btn.helpful:hover {
  background: #4caf50;
  color: white;
  border-color: #4caf50;
}

.feedback-btn.not-helpful:hover {
  background: #f44336;
  color: white;
  border-color: #f44336;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  text-align: center;
  font-size: 12px;
}

.back-to-top span {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.back-to-top:hover {
  background: #4a90e2;
  color: white;
  border-color: #4a90e2;
}

.pager {
  padding-left: 0;
  margin: 17px 0;
  list-style: none;
  text-align: center;
}

.pager:before,
.pager:after,
.panel-body:before,
.panel-body:after,
.modal-header:before,
.modal-header:after,
.modal-footer:before,
.modal-footer:after {
  content: " ";
  display: table;
}

.pagination {
  display: inline-block;
  padding-left: 0;
  margin: 17px 0;
  border-radius: 3px;
}

.pager .pagination {
  margin: 0;
}

.pager li {
  margin: 0 0.4em;
  display: inline-block;
}

.pagination>li>a,
.pagination>li>span {
  position: relative;
  float: left;
  padding: 6px 12px;
  line-height: 1.42857143;
  text-decoration: none;
  color: #2c3e50;
  background-color: #fff;
  border: 1px solid #ddd;
  margin-left: -1px;
}

.pager li>a,
.pager li>span {
  display: inline-block;
  padding: 5px 14px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 15px;
}

.pager li>a,
.pager li>span {
  background: none;
  border: 1px solid #e6e6e6;
  border-radius: 0.25em;
  padding: 0.5em 0.93em;
  font-size: 14px;
}

.pagination>li:first-child>a,
.pagination>li:first-child>span {
  margin-left: 0;
  border-bottom-left-radius: 3px;
  border-top-left-radius: 3px;
}

.pager li:first-child>a,
.pager li:last-child>a,
.pager li:first-child>span,
.pager li:last-child>span {
  padding: 0.5em 1.2em;
}

.pagination>.active>a,
.pagination>.active>span,
.pagination>.active>a:hover,
.pagination>.active>span:hover,
.pagination>.active>a:focus,
.pagination>.active>span:focus {
  z-index: 3;
  color: #fff;
  background-color: #2c3e50;
  border-color: #2c3e50;
  cursor: default;
}

/* Responsive Design */
@media (max-width: 968px) {
  .main-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .toc-sidebar {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-bottom: 24px;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

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

@media (max-width: 640px) {
  .hero {
    padding: 40px 20px;
  }

  .search-container {
    flex-direction: column;
  }

  .search-button {
    padding: 12px;
  }

  .content {
    padding: 20px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-controls {
    font-size: 12px;
  }

  .article-footer-nav {
    flex-direction: column;
  }

  .next-article {
    text-align: left;
  }
}