/* default 主题 — base.html 内联样式提取 */

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.cat-strip { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.cat-strip > a { scroll-snap-align: start; }

.fade-x { position: relative; }
.fade-x:before,
.fade-x:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  pointer-events: none;
  z-index: 10;
}
.fade-x:before { left: 0; background: linear-gradient(90deg, rgba(2,6,23,1), rgba(2,6,23,0)); }
.fade-x:after  { right: 0; background: linear-gradient(270deg, rgba(2,6,23,1), rgba(2,6,23,0)); }

#cat-overlay { overscroll-behavior: contain; }
#cat-panel { height: 100dvh; max-height: 100dvh; }
#cat-panel .cat-scroll {
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* 手机底部悬浮导航（不遮挡内容） */
@media (max-width: 640px) {
  main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav { display: flex !important; visibility: visible !important; opacity: 1 !important; }
}
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 56px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(2,6,23,0.72) 0%, rgba(2,6,23,0.92) 55%, rgba(2,6,23,0.98) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(148,163,184,0.10);
  z-index: 9999;
  align-items: center;
  justify-content: space-around;
  visibility: visible;
  opacity: 1;
  transform: translateZ(0);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.35);
}
.mobile-bottom-nav a,
.mobile-bottom-nav button {
  appearance: none;
  background: rgba(15,23,42,0.12);
  border: 0;
  color: rgba(226,232,240,0.85);
  font-size: 11px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
  border: 1px solid rgba(148,163,184,0.10);
}
.mobile-bottom-nav a:active,
.mobile-bottom-nav button:active {
  transform: translateY(1px);
}
.mobile-bottom-nav .active {
  color: #fff;
  background: rgba(59,130,246,0.22);
  border: 1px solid rgba(59,130,246,0.32);
}

/* 避免某些容器设置 overflow/transform 导致 fixed 失效或被裁剪 */
html, body { overflow-x: hidden; }
/*PWA提示框*/
#installContainer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* 半透明背景 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 提示框 */
#installBox {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 80%;
  max-width: 300px;
  position: relative;
}
#installBox p {
  color: #000 !important;
}
/* 关闭按钮 */
#closeBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

/* 安装按钮 */
#installBtn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

#installBtn:hover {
  background: #0056b3;
}