/* Manual page styles */
.qrcode-container {
  width: 147px;
  height: 147px;
  margin: 10px auto;
}

.qrcode-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.soft-box.active {
  border: 1px solid #e8ecf3;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f8fc 100%);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.manual-layout {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  min-height: calc(100vh - 300px);
}

.manual-directory {
  width: 280px;
  flex: 0 0 280px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  height: calc(100vh - 300px);
  overflow-y: auto;
  position: sticky;
  top: 20px;
  align-self: flex-start;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 1px solid #e9ecef;
}

.manual-directory-title {
  display: none;
}

.manual-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.manual-content-header {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
  position: sticky;
  top: 20px;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.manual-content-header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.manual-content-header > div > div:first-child {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
}

.manual-content-header h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .manual-content-header > div > div:first-child {
    flex-direction: row;
    align-items: center;
  }
  
  .manual-content-header h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
  }
}

.manual-content-header .soft-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .manual-content-header .soft-logo {
    width: 40px;
    height: 40px;
  }
}

.manual-content-header .soft-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.manual-breadcrumb-link {
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
}

.manual-breadcrumb-link:hover {
  color: #1e40af;
}

/* Responsive styles */
@media (max-width: 768px) {
  .manual-layout {
    flex-direction: column;
  }
  
  .manual-directory {
    width: 100%;
    flex: 1;
    height: auto;
    max-height: 300px;
    position: relative;
    top: 0;
  }
  
  .manual-content-header > div {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .manual-content-header > div > div:first-child {
    width: 100%;
  }
  
  .manual-content-header .soft-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .manual-content-header .btn-detail,
  .manual-content-header .btn-download {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .manual-content-header {
    padding: 15px;
  }
  
  .manual-content-header > div > div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .manual-content-header h1 {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .manual-content-header h1 .soft-link {
    font-weight: bold;
  }
  
  .manual-content-header .soft-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
  }
  
  .manual-content-header .btn-detail,
  .manual-content-header .btn-download {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    height: 36px;
  }
  
  .manual-content-header .download-dropdown {
    width: 100%;
  }
  
  .manual-content-header .download-dropdown .btn-download {
    width: 100%;
  }
  
  .manual-content-header .download-menu {
    width: 100%;
    left: 0;
    right: 0;
  }
}

.manual-content-header .btn-detail,
.manual-content-header .btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid #d9e1ea;
  box-sizing: border-box;
  white-space: nowrap;
}

.manual-content-header .btn-detail {
  color: #4b5563;
  background: #ffffff;
}

.manual-content-header .btn-detail:hover {
  color: #1f2937;
  border-color: #b9c4d1;
  background: #f8fafc;
}

.manual-content-header .btn-download {
  color: #fff;
  border-color: #0084ff;
  background: linear-gradient(135deg, #0084ff 0%, #0066ff 100%);
  box-shadow: 0 8px 18px rgba(0, 132, 255, 0.22);
  animation: downloadPulse 1.8s ease-in-out infinite;
}

.manual-content-header .btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 132, 255, 0.30);
  animation-play-state: paused;
}

.manual-content-header .download-dropdown {
  position: relative;
}

.manual-content-header .download-dropdown .download-arrow {
  margin-left: 6px;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.manual-content-header .download-dropdown.open .download-arrow {
  transform: rotate(180deg);
}

.manual-content-header .download-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 100%;
  background: #fff;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
  overflow: hidden;
  display: none;
  z-index: 60;
}

.manual-content-header .download-dropdown.open .download-menu {
  display: block;
}

.manual-content-header .download-menu a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #334155;
  font-size: 14px;
  text-decoration: none;
  background: #fff;
}

.manual-content-header .download-menu a img {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
}

.manual-content-header .download-menu a:hover {
  background: #f3f7ff;
  color: #1e40af;
}

.manual-content-header .download-menu li + li a {
  border-top: 1px solid #edf2f7;
}

.manual-article {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  flex: 1;
  overflow: visible;
  max-height: none;
}

.manual-directory-content {
  line-height: 1.8;
}

.manual-directory-content ul,
.manual-directory-content ol {
  margin: 0;
  padding-left: 20px;
  list-style-position: outside;
}

.manual-directory-content li {
  margin-bottom: 10px;
}

.manual-directory-content a {
  color: #666;
  text-decoration: none;
  display: block;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.manual-directory-content a:hover {
  color: #007bff;
  background: #e9ecef;
}

.manual-directory-content a.is-active {
  color: #007bff;
  font-weight: bold;
  background: #e9ecef;
}

/* New Manual table page enhancements */
.manual-article .article-summary {
  border: 1px solid #dbe5ff;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.manual-article .summary-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #3b48e2;
}

.manual-article .summary-text {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.8;
}

.manual-directory-content .article-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.manual-directory-content .article-toc__item {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  line-height: 1.5;
  margin: 6px 0;
  flex-wrap: nowrap;
}

.manual-directory-content .article-toc__index,
.manual-directory-content .article-toc__bullet {
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.5;
  color: #64748b;
}

.manual-directory-content .article-toc__bullet {
  width: 10px;
  text-align: center;
}

.manual-directory-content .article-toc__item .article-toc__link {
  color: #334155;
  text-decoration: none;
  display: block;
  padding: 0;
  border-radius: 0;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  flex: 1 1 auto;
  min-width: 0;
}

.manual-directory-content .article-toc__item .article-toc__link:hover,
.manual-directory-content .article-toc__item .article-toc__link.is-active {
  background: #eaf1ff;
  color: #1e40af;
}

.manual-directory-content .article-toc__level-2 {
  padding-left: 0;
}

.manual-directory-content .article-toc__level-3 {
  padding-left: 14px;
}

@media (max-width: 768px) {
  .manual-article {
    max-height: none;
    overflow: visible;
    padding: 18px;
  }
}

.manual-content {
  flex: 1;
  min-width: 0;
}

.manual-article {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.manual-article .content {
  line-height: 1.8;
  color: #333;
}

.manual-article .content h2 {
  font-size: 20px;
  font-weight: bold;
  margin: 30px 0 15px;
  color: #333;
}

.manual-article .content h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 25px 0 10px;
  color: #333;
}

.manual-article .content p {
  margin-bottom: 15px;
}

.manual-article .content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

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

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

.manual-content-header {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.manual-content-header h1 {
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 10px;
  color: #333;
}

.manual-content-header .soft-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.manual-content-header .soft-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.soft-box.active .soft-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.soft-box.active .soft-meta img.soft-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eef2f7;
  background: #fff;
}

.soft-box.active .soft-name {
  color: #1f2a37;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: 6px;
  word-break: break-all;
}

.soft-box.active .soft-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.soft-box.active .soft-tag {
  display: inline-flex;
  align-items: center;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.soft-box.active .soft-tag img {
  width: 14px;
  height: 14px;
  margin-right: 4px;
}

.soft-box.active .soft-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.soft-box.active .btn-detail,
.soft-box.active .btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid #d9e1ea;
  box-sizing: border-box;
  white-space: nowrap;
}

.soft-box.active .btn-detail {
  color: #4b5563;
  background: #ffffff;
}

.soft-box.active .btn-detail:hover {
  color: #1f2937;
  border-color: #b9c4d1;
  background: #f8fafc;
}

.soft-box.active .btn-download {
  color: #fff;
  border-color: #0084ff;
  background: linear-gradient(135deg, #0084ff 0%, #0066ff 100%);
  box-shadow: 0 8px 18px rgba(0, 132, 255, 0.22);
  animation: downloadPulse 1.8s ease-in-out infinite;
}

.soft-box.active .btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 132, 255, 0.30);
  animation-play-state: paused;
}

.soft-box.active .download-dropdown {
  position: relative;
}

.soft-box.active .download-dropdown .download-arrow {
  margin-left: 6px;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.soft-box.active .download-dropdown.open .download-arrow {
  transform: rotate(180deg);
}

.soft-box.active .download-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 100%;
  background: #fff;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
  overflow: hidden;
  display: none;
  z-index: 20;
}

.soft-box.active .download-dropdown.open .download-menu {
  display: block;
}

.soft-box.active .download-menu a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: #334155;
  font-size: 14px;
  text-decoration: none;
  background: #fff;
}

.soft-box.active .download-menu a img {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
}

.soft-box.active .download-menu a:hover {
  background: #f3f7ff;
  color: #1e40af;
}

.soft-box.active .download-menu li + li a {
  border-top: 1px solid #edf2f7;
}

@keyframes downloadPulse {
  0% {
    box-shadow: 0 8px 18px rgba(0, 132, 255, 0.18);
  }
  50% {
    box-shadow: 0 10px 24px rgba(0, 132, 255, 0.34);
  }
  100% {
    box-shadow: 0 8px 18px rgba(0, 132, 255, 0.18);
  }
}

@media (max-width: 768px) {
  .manual-layout {
    flex-direction: column;
    gap: 14px;
  }

  .manual-directory {
    width: 100%;
    flex: none;
    position: static;
    top: auto;
    height: auto;
    max-height: 300px;
    padding: 14px 12px;
    border-radius: 10px;
  }

  .manual-article {
    padding: 20px;
  }

  .soft-box.active {
    padding: 14px 12px;
    margin-bottom: 16px;
    border-radius: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .soft-box.active .soft-meta {
    width: 100%;
  }

  .soft-box.active .soft-name {
    font-size: 16px;
  }

  .soft-box.active .soft-actions {
    width: 100%;
    gap: 8px;
  }

  .soft-box.active .btn-detail,
  .soft-box.active .btn-download {
    flex: 1;
    min-width: 0;
    height: 38px;
    font-size: 14px;
  }

  .soft-box.active .download-menu {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .manual-content-header {
    padding: 14px 12px;
    margin-bottom: 16px;
  }

  .manual-content-header h1 {
    font-size: 20px;
  }
}
