/**
 * guide-sidebar.css - 详细攻略页面统一的侧边栏导航组件
 * 适用于所有需要左侧导航的详细攻略页面（BD攻略、机制解析、装备指南等）
 * @author 看雲起雲落
 *
 * 依赖：top-nav (来自 components.css)
 * 使用：在攻略页面引入此CSS，使用 .guide-sidebar 结构即可
 */

/* ====== 侧边栏主体 ====== */
.guide-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 220px;
  background: rgba(13,6,8,0.95);
  border-right: 1px solid rgba(58,32,40,0.5);
  padding: 1.5rem 0;
  z-index: 90;
  overflow-y: auto;
  transition: transform 0.3s ease;
  backdrop-filter: blur(8px);
}

.guide-sidebar::-webkit-scrollbar { width: 4px; }
.guide-sidebar::-webkit-scrollbar-track { background: transparent; }
.guide-sidebar::-webkit-scrollbar-thumb { background: rgba(218,165,32,0.3); border-radius: 2px; }

/* 移动端切换按钮 */
.guide-sidebar-toggle {
  display: none;
  position: fixed;
  top: 72px;
  left: 12px;
  z-index: 95;
  width: 36px;
  height: 36px;
  background: rgba(26,15,20,0.95);
  border: 1px solid rgba(58,32,40,0.5);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.guide-sidebar-toggle svg {
  width: 18px;
  height: 18px;
  stroke: #DAA520;
  stroke-width: 2;
  fill: none;
}

/* 标题 */
.guide-sidebar-title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: #DAA520;
  letter-spacing: 2px;
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid rgba(58,32,40,0.3);
  margin-bottom: 0.75rem;
}

/* 导航列表 */
.guide-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-sidebar-nav li { margin: 0; }

.guide-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.78rem;
  color: #8a7a70;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  position: relative;
}

.guide-sidebar-nav a:hover {
  color: #DAA520;
  background: rgba(218,165,32,0.04);
}

.guide-sidebar-nav a.active {
  color: #DAA520;
  background: rgba(218,165,32,0.08);
  border-left-color: #DAA520;
}

.guide-sidebar-nav .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.guide-sidebar-nav .nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-sidebar-nav .nav-step {
  font-size: 0.6rem;
  color: #554444;
  letter-spacing: 1px;
  padding: 0.1rem 0.4rem;
  background: rgba(58,32,40,0.3);
  border-radius: 3px;
  flex-shrink: 0;
}

.guide-sidebar-divider {
  height: 1px;
  background: rgba(58,32,40,0.3);
  margin: 0.75rem 1.25rem;
}

.guide-sidebar-footer {
  padding: 1rem 1.25rem 0;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(58,32,40,0.3);
}

.guide-sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: #665555;
  text-decoration: none;
  transition: color 0.2s;
}

.guide-sidebar-footer a:hover {
  color: #DAA520;
}

/* 主内容区域偏移 */
.guide-content {
  margin-left: 220px;
  padding-top: 64px;
}

/* ====== 移动端响应 ====== */
@media (max-width: 768px) {
  .guide-sidebar {
    transform: translateX(-100%);
  }

  .guide-sidebar.open {
    transform: translateX(0);
  }

  .guide-sidebar-toggle {
    display: flex;
  }

  .guide-content {
    margin-left: 0;
  }
}

/* ====== 站点 Header & Footer (统一组件) ====== */
.site-header-section {
  padding: 5rem 0 1rem;
}

.footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  color: #554444;
  font-size: 0.75rem;
}

.footer-qr {
  width: 48px !important;
  height: 48px !important;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  object-fit: contain;
  background: #fff;
  padding: 2px;
  cursor: pointer;
  transition: all 0.2s;
  max-width: none !important;
  max-height: none !important;
}

.footer-qr:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(255,255,255,0.15);
}

.qr-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.qr-preview-overlay.open {
  opacity: 1;
  visibility: visible;
}

.qr-preview-overlay img {
  width: 200px !important;
  height: 200px !important;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
  max-width: none !important;
  max-height: none !important;
}

@media (max-width: 768px) {
  .site-header-section { padding: 4rem 1rem 1rem; }
  .site-header-section .container { flex-direction: column; text-align: center; gap: 0.75rem !important; }
  .footer { padding: 1.5rem 1rem; }
}
