/* 下载页面 - 左侧菜单布局 */

.doc-page {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
  background: var(--bg);
}

/* 产品介绍 */
.doc-section--hero {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

.product-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.product-hero-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.product-hero-info h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--text);
}

.product-hero-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.doc-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 2.5rem;
}

/* 左侧菜单 */
.doc-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.doc-nav {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.75rem 0;
}

.doc-nav-item {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.doc-nav-item:hover {
  color: var(--text);
  background: var(--bg);
  text-decoration: none;
}

.doc-nav-item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* 右侧内容 */
.doc-content {
  flex: 1;
  min-width: 0;
}

.doc-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem 2.5rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 80px;
}

.doc-section h2 {
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.25rem;
  color: var(--text);
}

/* 产品下载 */
.download-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.download-item:hover {
  border-color: var(--accent);
}

.download-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.download-info {
  flex: 1;
  min-width: 0;
}

.download-info h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.download-desc {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.download-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-action {
  flex-shrink: 0;
}

/* 版本对比卡片 */
.version-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.version-card {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.version-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.version-card--featured {
  border-color: var(--accent);
}

.version-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.version-header {
  margin-bottom: 1rem;
}

.version-header h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.version-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.version-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.version-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  text-align: left;
}

.version-features li {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.version-features li.disabled {
  color: #94a3b8;
  text-decoration: line-through;
}

.version-action .btn {
  width: 100%;
}

/* 响应式 */
@media (max-width: 768px) {
  .version-cards {
    grid-template-columns: 1fr;
  }
}

/* 产品截图 */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.screenshot-item {
  text-align: center;
}

.screenshot-item img.screenshot-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.screenshot-item img.screenshot-img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.screenshot-item p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 图片灯箱 */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 使用说明 */
.guide-block {
  margin-bottom: 2rem;
}

.guide-block:last-child {
  margin-bottom: 0;
}

.guide-block h3 {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step {
  display: flex;
  gap: 1rem;
}

.step-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.step-content h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.step-content p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.step-content pre {
  background: #1a2332;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  overflow-x: auto;
  margin: 0;
}

.step-content pre code {
  color: #e2e8f0;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* 常见问题 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.faq-item summary {
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-item[open] summary {
  margin-bottom: 0.75rem;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.faq-item code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent);
}

/* 响应式 */
@media (max-width: 768px) {
  .doc-container {
    flex-direction: column;
    gap: 1rem;
  }

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

  .doc-nav {
    display: flex;
    overflow-x: auto;
    gap: 0;
    padding: 0;
    white-space: nowrap;
  }

  .doc-nav-item {
    padding: 0.75rem 1rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .doc-nav-item.is-active {
    border-left: none;
    border-bottom-color: var(--accent);
  }

  .doc-section {
    padding: 1.25rem 1rem;
  }

  .download-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .download-action {
    width: 100%;
    margin-top: 0.75rem;
  }

  .download-action .btn {
    width: 100%;
    justify-content: center;
  }

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

  .screenshot-item img.screenshot-img {
    height: auto;
    min-height: 200px;
  }

  .version-cards {
    grid-template-columns: 1fr;
  }
}
