/* ==========================================
   家电管家百科 - 全局样式补充
   ========================================== */

/* 基础变量 */
:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #DBEAFE;
  --color-accent: #F59E0B;
  --color-success: #10B981;
  --color-bg: #FAFAFA;
  --color-text: #1F2937;
  --color-text-secondary: #6B7280;
  --color-border: #E5E7EB;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.12);
  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-tag: 4px;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 字体优化 */
body {
  font-family: "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 打印优化 */
@media print {
  .no-print {
    display: none !important;
  }
  .print-break {
    page-break-before: always;
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 搜索高亮 */
.search-highlight {
  background-color: #FEF3C7;
  padding: 0 2px;
  border-radius: 2px;
}

/* 目录导航高亮 */
.toc-link.active {
  color: var(--color-primary);
  font-weight: 600;
  border-left: 3px solid var(--color-primary);
  padding-left: 12px;
  background-color: var(--color-primary-light);
}

/* 懒加载占位 */
.img-lazy {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 卡片悬浮动画 */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* 步骤编号样式 */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

/* FAQ手风琴 */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* 面包屑 */
.breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: var(--color-text-secondary);
}

/* 移动端菜单 */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open {
  transform: translateX(0);
}

/* 固定目录 */
.sticky-toc {
  position: sticky;
  top: 80px;
}
