/* 搜索相关额外样式 */
.search-result-item.selected {
  background: var(--accent-light);
}

.search-no-results {
  padding: 2rem;
  text-align: center;
}

.search-no-results p:first-child {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.search-no-results .text-secondary {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 0;
}

mark {
  background: var(--accent-light);
  color: var(--accent-color);
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
}

/* 代码复制按钮样式 */
.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

pre:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.code-copy-btn.copied {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* 移动端导航 */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .navbar-menu {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    display: none;
  }

  .navbar-menu.active {
    display: flex;
  }

  .navbar-menu li {
    padding: 0;
  }

  .navbar-menu a {
    display: block;
    padding: 1rem 2rem;
  }

  .navbar-content {
    position: relative;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

/* 平滑滚动进度条 */
.scroll-progress {
  position: fixed;
  top: 70px;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-color);
  z-index: 1001;
  transition: width 0.1s ease;
}

/* 导航栏滚动效果 */
.navbar.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 加载动画容器 */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state-description {
  color: var(--text-secondary);
}
