:root {
  /* 仅 ≤ 此宽度使用「手机/极窄」布局；更宽时保持桌面栅格并可横向滚动 */
  --phone-max: 520px;
  --bg: #0b1530;
  --bg-2: #13244a;
  --panel: rgba(14, 24, 47, 0.78);
  --panel-border: rgba(142, 173, 255, 0.22);
  --text: #eaf1ff;
  --muted: #9fb2da;
  --primary: #6ea8ff;
  --primary-2: #80e6ff;
  --notice-bg: linear-gradient(90deg, rgba(126, 224, 255, 0.2), rgba(127, 171, 255, 0.22));
  /* 与游侠网等国内门户相近：优先微软雅黑 UI / 微软雅黑 / 苹方（系统自带，无需外联字体） */
  --font-sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Heiti SC",
    "WenQuanYi Micro Hei", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  color-scheme: dark;
  /* 根页面不显示垂直滚动条：避免右侧黑条与通知展开导致的滚动条抖动 */
  overflow-y: hidden;
}
body {
  margin: 0;
  color: var(--text);
  overflow-y: hidden;
  background: radial-gradient(1200px 700px at 15% -10%, #2b4f95 0%, transparent 65%),
              radial-gradient(1100px 800px at 90% -5%, #33488e 0%, transparent 60%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: var(--font-sans);
  font-weight: 400;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: auto;
  font-size: 14px;
}

@media (min-width: 521px) {
  html {
    overflow-x: auto;
  }
  .container {
    width: max(1000px, min(1480px, calc(100vw - 48px)));
  }
}
body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  z-index: -5;
  pointer-events: none;
  background:
    radial-gradient(36% 28% at 12% 24%, rgba(122, 169, 255, 0.2), transparent 72%),
    radial-gradient(42% 34% at 82% 16%, rgba(94, 226, 255, 0.16), transparent 74%),
    radial-gradient(38% 32% at 56% 86%, rgba(131, 137, 255, 0.14), transparent 72%);
  animation: dreamFlow 18s ease-in-out infinite alternate;
}

#particleBg {
  position: fixed;
  inset: 0;
  z-index: -4;
}
.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.48;
  z-index: -3;
}
.orb-a { width: 240px; height: 240px; left: 8%; top: 16%; background: rgba(90, 139, 255, 0.84); }
.orb-b { width: 320px; height: 320px; right: 10%; top: 10%; background: rgba(81, 215, 255, 0.76); }
.orb-a { animation: orbFloatA 13s ease-in-out infinite; }
.orb-b { animation: orbFloatB 16s ease-in-out infinite; }
.bg-orb::after {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: inherit;
  border: 1px solid rgba(170, 215, 255, 0.24);
  opacity: 0.45;
  animation: orbPulse 4.8s ease-in-out infinite;
}
.bg-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 24%, rgba(160, 205, 255, 0.06) 50%, transparent 76%);
  transform: translateX(-80%);
  animation: gridSweep 13s linear infinite;
}
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(120, 170, 255, 0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(120, 170, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 95%);
  z-index: -2;
}

.container {
  width: min(1480px, calc(100vw - 48px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(140, 173, 255, 0.25);
  background: rgba(7, 13, 28, 0.72);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}
.brand h1 {
  margin: 0;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #d9e9ff, #8fc7ff, #b6f0ff, #d9e9ff);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandFlow 6s linear infinite;
}
.brand-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(120, 189, 255, 0.32);
  transform-origin: center;
  animation: brandLogoPulse 2.6s ease-in-out infinite;
}
.ad-rail-mobile {
  display: none;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(175, 225, 255, 0.78);
  color: #eaf7ff;
  background: linear-gradient(135deg, rgba(103, 177, 255, 0.84), rgba(105, 106, 255, 0.7));
  box-shadow: 0 0 14px rgba(120, 189, 255, 0.32);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.6;
  white-space: nowrap;
}
.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  position: relative;
  display: inline-block;
}
.brand p::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 210, 255, 0.85), transparent);
  opacity: 0.65;
  animation: subtitleGlow 3.2s ease-in-out infinite;
}
.nav { display: flex; gap: 14px; }
.nav a {
  font-size: 13px;
  color: #d3e3ff;
  text-decoration: none;
  border: 1px solid rgba(136, 168, 239, 0.18);
  border-radius: 10px;
  padding: 7px 12px;
  background: linear-gradient(180deg, rgba(31, 50, 90, 0.4), rgba(16, 27, 50, 0.42));
  box-shadow: inset 0 0 0 1px rgba(114, 151, 231, 0.06);
  transition: all .22s ease;
}
.nav a:hover, .nav a.active {
  border-color: rgba(145, 191, 255, 0.64);
  background: linear-gradient(180deg, rgba(83, 129, 226, 0.42), rgba(46, 80, 165, 0.3));
  box-shadow: 0 0 14px rgba(104, 157, 255, 0.24), inset 0 0 0 1px rgba(160, 210, 255, 0.2);
  transform: translateY(-1px);
}
.nav a.nav-sort-latest-active {
  border-color: rgba(186, 228, 255, 0.88);
  background: linear-gradient(180deg, rgba(100, 160, 255, 0.52), rgba(56, 95, 195, 0.42));
  box-shadow:
    0 0 18px rgba(120, 185, 255, 0.38),
    inset 0 0 0 1px rgba(210, 236, 255, 0.28);
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown-trigger {
  font-size: 13px;
  color: #d3e3ff;
  text-decoration: none;
  border: 1px solid rgba(136, 168, 239, 0.18);
  border-radius: 10px;
  padding: 7px 12px;
  background: linear-gradient(180deg, rgba(31, 50, 90, 0.4), rgba(16, 27, 50, 0.42));
  box-shadow: inset 0 0 0 1px rgba(114, 151, 231, 0.06);
  transition: all .22s ease;
  cursor: default;
  display: inline-block;
}
.nav-dropdown.open .nav-dropdown-trigger,
.nav-dropdown-trigger:hover {
  border-color: rgba(145, 191, 255, 0.64);
  background: linear-gradient(180deg, rgba(83, 129, 226, 0.42), rgba(46, 80, 165, 0.3));
  box-shadow: 0 0 14px rgba(104, 157, 255, 0.24), inset 0 0 0 1px rgba(160, 210, 255, 0.2);
  transform: translateY(-1px);
}
.nav-submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  min-width: 148px;
  background: rgba(12, 22, 44, 0.96);
  border: 1px solid rgba(136, 168, 239, 0.35);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(5, 10, 24, 0.55);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  pointer-events: none;
}
.nav-dropdown.open .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-submenu a {
  display: block;
  font-size: 13px;
  color: #d3e3ff;
  text-decoration: none;
  padding: 9px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background .15s ease;
}
.nav-submenu a:hover {
  background: rgba(83, 129, 226, 0.35);
  transform: none;
  box-shadow: none;
}

.notice-wrap {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}
.notice-banner {
  border: 1px solid rgba(149, 206, 255, 0.42);
  border-radius: 14px;
  background:
    linear-gradient(130deg, rgba(111, 185, 255, 0.22), rgba(73, 120, 225, 0.08)),
    rgba(12, 30, 63, 0.72);
  box-shadow:
    inset 0 0 28px rgba(133, 200, 255, 0.14),
    0 8px 20px rgba(7, 16, 36, 0.35);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, background .25s ease;
}
.notice-banner:hover {
  border-color: rgba(166, 221, 255, 0.72);
  box-shadow:
    inset 0 0 28px rgba(138, 206, 255, 0.18),
    0 10px 24px rgba(8, 22, 48, 0.44);
}
.notice-trigger {
  width: 100%;
  border: none;
  background: transparent;
  color: #e5f5ff;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.notice-trigger:hover .notice-text { text-decoration: underline; }
.notice-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(123, 191, 255, 0.35), rgba(63, 117, 222, 0.2));
  box-shadow: inset 0 0 0 1px rgba(186, 226, 255, 0.35);
  font-size: 13px;
}
.notice-line {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.notice-badge-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.notice-badge-wrap:empty {
  display: none;
}
.notice-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.notice-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #e5f5ff;
}
.notice-text.title-by-badge { font-weight: 700; }
.notice-badge.res-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notice-pin-badge {
  box-shadow:
    0 0 0 1px rgba(255, 155, 155, 0.42),
    0 2px 10px rgba(255, 78, 108, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.notice-more {
  font-size: 12px;
  color: #b9dfff;
  border: 1px solid rgba(161, 214, 255, 0.42);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(71, 129, 215, 0.2);
}
.notice-banner a {
  color: #dff4ff;
  text-decoration: none;
  font-weight: 600;
}
.notice-banner a:hover { text-decoration: underline; }
.notice-single {
  overflow: hidden;
}
.notice-main-item {
  border-bottom: 1px solid rgba(138, 196, 255, 0.18);
}
.notice-single .notice-main-item:last-child {
  border-bottom: none;
}
/* 悬停 / 键盘聚焦展开：列表区约 5 行高，超出用滚动条（无「点击再展开」） */
.notice-all-list {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .28s ease, opacity .22s ease;
}
.notice-single.notice-expanded .notice-all-list,
.notice-single:focus-within .notice-all-list {
  /* 约 5 行：padding 12*2 + 内容 ~28px ≈ 52px/行 */
  max-height: calc(52px * 5 + 6px);
  opacity: 1;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(132, 187, 255, 0.88) rgba(14, 30, 61, 0.56);
}
.notice-single.notice-expanded .notice-all-list::-webkit-scrollbar,
.notice-single:focus-within .notice-all-list::-webkit-scrollbar {
  width: 8px;
}
.notice-single.notice-expanded .notice-all-list::-webkit-scrollbar-track,
.notice-single:focus-within .notice-all-list::-webkit-scrollbar-track {
  background: rgba(14, 30, 61, 0.56);
  border-radius: 999px;
}
.notice-single.notice-expanded .notice-all-list::-webkit-scrollbar-thumb,
.notice-single:focus-within .notice-all-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(145, 203, 255, 0.95), rgba(95, 145, 241, 0.95));
  border-radius: 999px;
  border: 1px solid rgba(182, 224, 255, 0.5);
}
.notice-sub-item {
  border-top: 1px solid rgba(138, 196, 255, 0.16);
  background: linear-gradient(90deg, rgba(82, 137, 234, 0.06), rgba(57, 106, 210, 0.03));
  transition: background .2s ease, border-color .2s ease;
}
.notice-sub-item:hover {
  border-top-color: rgba(163, 217, 255, 0.34);
  background: linear-gradient(90deg, rgba(108, 173, 255, 0.22), rgba(102, 131, 255, 0.16));
  animation: noticeItemShift 1.8s ease-in-out infinite alternate;
}
.notice-expand-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: none;
  border-top: 1px solid rgba(138, 196, 255, 0.16);
  background: linear-gradient(90deg, rgba(60, 110, 210, 0.22), rgba(40, 80, 160, 0.12));
  color: #b9dfff;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.notice-expand-toggle:hover {
  background: linear-gradient(90deg, rgba(90, 150, 240, 0.28), rgba(60, 110, 210, 0.18));
  color: #e8f4ff;
}
.notice-trigger.notice-roll-up {
  animation: noticeRollUp .36s ease;
}
@keyframes noticeRollUp {
  0% { transform: translateY(10px); opacity: 0.25; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes noticeItemShift {
  0% { filter: saturate(100%) brightness(1); }
  100% { filter: saturate(114%) brightness(1.06); }
}
/* 手机端多条通知默认收起，见 .notice-expand-toggle + app.js */
#noticeDialogLink {
  color: #dff4ff;
  text-decoration: none;
  border: 1px solid rgba(145, 201, 255, 0.55);
  border-radius: 10px;
  padding: 8px 12px;
}
#noticeDialogLink:hover {
  text-decoration: underline;
}

.demand-form {
  display: grid;
  gap: 10px;
}
#demandContentInput {
  min-height: 120px;
  resize: vertical;
}

.page-shell {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
  /* 桌面保持宽布局：视口再窄也先横向滚动，而不是立刻切换移动布局 */
  min-width: 1360px;
  overflow-x: auto;
  overflow-y: visible;
}
.layout {
  display: grid;
  gap: 14px;
  grid-template-columns: 160px minmax(0, 1fr);
}

/* 分类侧栏：根页面不允许滚动时，侧栏自身可滚动 */
#categoryPanel {
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  scrollbar-width: thin;
}

#categoryPanel::-webkit-scrollbar {
  width: 8px;
}

#categoryPanel::-webkit-scrollbar-track {
  background: rgba(12, 23, 48, 0.55);
}

#categoryPanel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(122, 181, 255, 0.6), rgba(86, 136, 228, 0.55));
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: content-box;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.24);
}

.resource-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 170px);
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.panel-title-row h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.chip {
  border: 1px solid rgba(142, 190, 255, 0.45);
  border-radius: 999px;
  padding: 2px 9px;
  color: #d8ecff;
  font-size: 12px;
}

#categoryList {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
#categoryList li {
  /* 桌面分类按钮再窄一些，给资源名列腾空间 */
  width: 74%;
  max-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 12px;
  padding: 9px 10px;
  min-height: 38px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #dde9ff;
  text-shadow: 0 1px 2px rgba(0, 12, 40, 0.55);
  border: 1px solid rgba(130, 168, 255, 0.38);
  background:
    linear-gradient(
      168deg,
      rgba(118, 168, 255, 0.28) 0%,
      rgba(62, 108, 210, 0.2) 38%,
      rgba(28, 52, 118, 0.55) 100%
    );
  box-shadow:
    0 5px 14px rgba(4, 12, 36, 0.42),
    0 2px 4px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -8px 18px rgba(0, 8, 32, 0.32);
  transition:
    transform 0.2s ease,
    box-shadow 0.22s ease,
    border-color 0.2s ease,
    filter 0.2s ease,
    background 0.22s ease;
}
#categoryList li::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 11px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 42%,
    transparent 100%
  );
  opacity: 0.85;
}
#categoryList li:hover {
  transform: translateY(-2px);
  border-color: rgba(170, 210, 255, 0.65);
  filter: brightness(1.06);
  box-shadow:
    0 10px 22px rgba(4, 16, 48, 0.5),
    0 0 20px rgba(100, 160, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -8px 20px rgba(0, 10, 36, 0.32);
}
#categoryList li.active {
  color: #f4f8ff;
  border-color: rgba(186, 224, 255, 0.85);
  background:
    linear-gradient(
      168deg,
      rgba(130, 190, 255, 0.45) 0%,
      rgba(72, 130, 240, 0.38) 35%,
      rgba(36, 72, 180, 0.72) 100%
    );
  box-shadow:
    0 8px 22px rgba(30, 90, 220, 0.35),
    0 0 28px rgba(120, 185, 255, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -12px 28px rgba(0, 20, 80, 0.45);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(100px, 132px) minmax(0, 1fr) auto minmax(130px, 168px);
  gap: 10px;
  align-items: center;
}
.search-scope-wrap {
  position: relative;
  min-width: 0;
}
.cat-toggle-btn {
  display: none;
}
.disk-filter-wrap {
  position: relative;
  min-width: 0;
}
.disk-filter-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(146, 187, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(83, 129, 226, 0.44), rgba(36, 64, 134, 0.56)),
    rgba(9, 20, 44, 0.88);
  color: #eaf3ff;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow:
    0 6px 14px rgba(8, 21, 52, 0.35),
    inset 0 0 0 1px rgba(181, 218, 255, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.disk-filter-btn:hover {
  border-color: rgba(177, 214, 255, 0.9);
  filter: brightness(1.05);
  box-shadow:
    0 8px 18px rgba(8, 21, 52, 0.42),
    0 0 12px rgba(103, 163, 255, 0.22),
    inset 0 0 0 1px rgba(205, 233, 255, 0.18);
}
.disk-filter-btn[aria-expanded="true"] {
  border-color: rgba(186, 228, 255, 0.95);
  box-shadow:
    0 0 16px rgba(120, 185, 255, 0.35),
    inset 0 0 0 1px rgba(220, 240, 255, 0.22);
}
.disk-filter-btn #diskFilterLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.disk-filter-caret {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(190, 220, 255, 0.9);
  margin-top: 2px;
  transition: transform 0.2s ease;
}
.disk-filter-btn[aria-expanded="true"] .disk-filter-caret {
  transform: rotate(180deg);
}
.disk-filter-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 45;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid rgba(145, 190, 255, 0.52);
  background: rgba(10, 20, 42, 0.97);
  backdrop-filter: blur(14px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(130, 175, 255, 0.1);
  max-height: min(320px, 52vh);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 184, 255, 0.85) rgba(12, 23, 48, 0.65);
}
.disk-filter-menu::-webkit-scrollbar {
  width: 8px;
}
.disk-filter-menu::-webkit-scrollbar-thumb {
  background: rgba(122, 181, 255, 0.75);
  border-radius: 8px;
}
.disk-filter-menu li {
  margin: 0;
  padding: 0;
}
.disk-filter-menu button {
  width: 100%;
  margin: 0;
  padding: 9px 11px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #e2ecff;
  font-size: 12px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.disk-filter-menu button::before {
  display: none;
}
.disk-filter-menu button:hover {
  background: rgba(103, 145, 240, 0.22);
  color: #ffffff;
  transform: none;
  filter: none;
}
.disk-filter-menu button.is-active {
  background: rgba(102, 153, 255, 0.32);
  color: #ffffff;
  border: 1px solid rgba(160, 205, 255, 0.45);
}
.disk-filter-menu .disk-filter-empty {
  padding: 10px 11px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.search-wrap {
  position: relative;
}
.search-wrap #searchInput {
  width: 100%;
  padding-right: 40px;
}
#searchClearBtn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  display: none;
}
#searchClearBtn.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
input, button {
  border-radius: 10px;
  border: 1px solid rgba(132, 165, 245, 0.48);
  background: rgba(11, 21, 42, 0.74);
  color: var(--text);
  font-size: 13px;
}
textarea {
  border-radius: 10px;
  border: 1px solid rgba(132, 165, 245, 0.48);
  background: rgba(11, 21, 42, 0.74);
  color: var(--text);
  font-size: 13px;
  padding: 10px 12px;
  font-family: inherit;
}
input { padding: 10px 12px; }
button {
  position: relative;
  overflow: hidden;
  padding: 10px 16px;
  cursor: pointer;
  color: #eaf3ff;
  border: 1px solid rgba(146, 187, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(83, 129, 226, 0.44), rgba(36, 64, 134, 0.56)),
    rgba(9, 20, 44, 0.82);
  box-shadow:
    0 8px 18px rgba(8, 21, 52, 0.4),
    inset 0 0 0 1px rgba(181, 218, 255, 0.12);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, filter .2s ease;
}
button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 22%, rgba(193, 226, 255, 0.3) 48%, transparent 74%);
  transform: translateX(-120%);
  opacity: 0;
  transition: transform .4s ease, opacity .3s ease;
  pointer-events: none;
}
button:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 214, 255, 0.95);
  box-shadow:
    0 12px 24px rgba(7, 20, 50, 0.5),
    0 0 16px rgba(103, 163, 255, 0.32),
    inset 0 0 0 1px rgba(205, 233, 255, 0.2);
}
button:hover::before {
  opacity: 1;
  transform: translateX(120%);
}
button:active {
  transform: translateY(0);
  filter: brightness(0.96);
  box-shadow:
    0 4px 12px rgba(6, 16, 40, 0.5),
    inset 0 0 0 1px rgba(198, 229, 255, 0.16);
}
button:focus-visible {
  outline: 2px solid rgba(166, 215, 255, 0.85);
  outline-offset: 2px;
}
button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(178, 205, 255, 0.1);
}
button:disabled::before { display: none; }

#searchBtn,
#submitDemandBtn,
#acceptComplianceBtn {
  border-color: rgba(174, 226, 255, 0.9);
  background:
    linear-gradient(135deg, rgba(91, 164, 255, 0.9), rgba(79, 98, 255, 0.82));
  box-shadow:
    0 10px 24px rgba(50, 98, 214, 0.42),
    inset 0 0 0 1px rgba(224, 242, 255, 0.28);
}
#searchBtn:hover,
#submitDemandBtn:hover,
#acceptComplianceBtn:hover {
  box-shadow:
    0 12px 28px rgba(54, 108, 229, 0.52),
    0 0 18px rgba(130, 194, 255, 0.42),
    inset 0 0 0 1px rgba(234, 247, 255, 0.34);
}
#searchBtn {
  white-space: nowrap;
}

#prevBtn,
#nextBtn,
#closeDetail,
#cancelDemandBtn,
#declineComplianceBtn {
  background:
    linear-gradient(180deg, rgba(92, 122, 187, 0.32), rgba(42, 64, 114, 0.34)),
    rgba(10, 20, 42, 0.78);
}

/* 主统计在列表上方；当前页资源/总页数与分页同排（见 .pager-page-row）。手机/极窄时见 @media (max-width: 520px) */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stats-primary {
  margin-top: 12px;
}
.pager-page-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
}
.pager-page-row .pager {
  margin-top: 0;
}
.stats-page {
  flex: 1 1 auto;
  min-width: min(100%, 220px);
  justify-content: center;
}
.metric {
  font-size: 11px;
  color: #bdd5ff;
  border: 1px solid rgba(130, 165, 244, 0.38);
  background: rgba(93, 124, 206, 0.12);
  border-radius: 999px;
  padding: 4px 9px;
}

/* 资源标题/详情里的「（12集）」高级标签样式 */
.episode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #eaf7ff;
  border: 1px solid rgba(140, 190, 255, 0.62);
  background: linear-gradient(135deg, rgba(110, 168, 255, 0.36), rgba(128, 230, 255, 0.12));
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(182, 215, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: translateY(-0.5px);
}

.episode-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(128, 230, 255, 0.95), rgba(110, 168, 255, 0.95));
  box-shadow: 0 0 14px rgba(128, 230, 255, 0.35);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.title-text .episode-pill {
  line-height: 1.1;
}

#resourceList {
  margin-top: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 184, 255, 0.9) rgba(12, 23, 48, 0.7);
}

#resourceList::-webkit-scrollbar {
  width: 10px;
}
#resourceList::-webkit-scrollbar-track {
  background: rgba(12, 23, 48, 0.7);
  border-radius: 10px;
  border: 1px solid rgba(113, 154, 235, 0.25);
}
#resourceList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(122, 181, 255, 0.95), rgba(86, 136, 228, 0.95));
  border-radius: 10px;
  border: 1px solid rgba(178, 216, 255, 0.75);
  box-shadow: 0 0 8px rgba(106, 168, 255, 0.45);
}
#resourceList::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(153, 204, 255, 1), rgba(104, 154, 246, 1));
}

.table-wrap {
  border: 1px solid rgba(129, 160, 240, 0.28);
  border-radius: 12px;
  overflow: hidden;
}
.table-head, .table-row {
  display: grid;
  /* 中间「分类」列略加宽，否则标签再 padding 也会被列宽吃掉，肉眼几乎无变化 */
  grid-template-columns: minmax(0, 1.28fr) minmax(132px, 0.52fr) minmax(200px, 1fr);
  align-items: center;
}
.table-head {
  background: rgba(100, 138, 228, 0.2);
  font-size: 13px;
  font-weight: 500;
  color: #d2e4ff;
}
.table-head > div, .table-row > div { padding: 12px; }
.table-row {
  border-top: 1px solid rgba(126, 160, 244, 0.18);
  cursor: default;
  /* 默认可见，避免 Edge/系统关闭动画时内容被永久隐藏 */
  opacity: 1;
  transform: none;
  animation: fadeUp .34s ease both;
  position: relative;
}
/* 置顶：不显示「置顶」字牌，用左侧光带 + 浅底区分 */
.table-row--pinned {
  background: linear-gradient(
    90deg,
    rgba(255, 183, 77, 0.14) 0%,
    rgba(255, 183, 77, 0.05) 18%,
    transparent 52%
  );
}
.table-row--pinned::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #ffe082 0%, #ff9800 42%, #e65100 100%);
  box-shadow: 0 0 16px rgba(255, 160, 60, 0.5);
  pointer-events: none;
}
.table-row--pinned:hover {
  background: linear-gradient(
    90deg,
    rgba(255, 200, 120, 0.2) 0%,
    rgba(255, 190, 100, 0.08) 22%,
    rgba(103, 145, 240, 0.12) 100%
  );
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.table-row:hover { background: rgba(103, 145, 240, 0.18); }
.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* 详情入口：默认即清晰可见，悬停再略提亮 */
.row-detail-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(160, 205, 255, 0.55);
  border-radius: 9px;
  background:
    linear-gradient(165deg, rgba(110, 165, 255, 0.42), rgba(45, 85, 190, 0.55)),
    rgba(18, 36, 78, 0.75);
  color: #e8f4ff;
  cursor: pointer;
  opacity: 0.92;
  box-shadow:
    0 2px 8px rgba(0, 12, 40, 0.45),
    0 0 14px rgba(90, 150, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    opacity 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
}
.table-row:hover .row-detail-btn {
  opacity: 1;
  box-shadow:
    0 4px 12px rgba(0, 16, 48, 0.5),
    0 0 20px rgba(120, 185, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
.row-detail-btn:hover {
  border-color: rgba(200, 235, 255, 0.75);
  color: #ffffff;
  transform: scale(1.06);
  filter: brightness(1.08);
}
.row-detail-btn:focus-visible {
  outline: 2px solid rgba(180, 220, 255, 0.95);
  outline-offset: 2px;
  opacity: 1;
}
.row-detail-btn-icon {
  display: block;
  filter: drop-shadow(0 0 3px rgba(180, 220, 255, 0.55));
  opacity: 1;
}
.res-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  flex-shrink: 0;
  align-items: center;
}
.res-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px 3px 8px;
  border-radius: 6px;
  line-height: 1.3;
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.res-badge-featured {
  background: linear-gradient(155deg, rgba(255, 112, 112, 0.95) 0%, rgba(183, 28, 28, 0.98) 55%, rgba(120, 20, 30, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 10px rgba(200, 40, 60, 0.35),
    inset 0 1px 0 rgba(255, 200, 200, 0.35);
}
.res-badge-must {
  background: linear-gradient(155deg, rgba(255, 120, 120, 0.95), rgba(140, 20, 30, 0.98));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 10px rgba(180, 50, 70, 0.32),
    inset 0 1px 0 rgba(255, 200, 200, 0.3);
}
.res-badge-rec {
  background: linear-gradient(155deg, rgba(255, 200, 130, 0.98), rgba(230, 120, 30, 0.98));
  color: #1f1408;
  border-color: rgba(255, 230, 180, 0.55);
  box-shadow:
    0 0 0 1px rgba(60, 40, 10, 0.2),
    0 2px 10px rgba(230, 140, 40, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.res-badge-hot {
  background: linear-gradient(155deg, rgba(255, 150, 170, 0.95), rgba(170, 30, 90, 0.96));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 10px rgba(200, 60, 120, 0.32),
    inset 0 1px 0 rgba(255, 220, 230, 0.35);
}
.res-badge-news {
  background: linear-gradient(155deg, rgba(140, 120, 110, 0.95), rgba(60, 45, 38, 0.98));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(200, 190, 180, 0.2);
}
.res-badge-play {
  background: linear-gradient(155deg, rgba(160, 130, 230, 0.96), rgba(70, 40, 140, 0.98));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 2px 10px rgba(120, 80, 200, 0.35),
    inset 0 1px 0 rgba(230, 210, 255, 0.35);
}
.res-badge-dlc {
  background: linear-gradient(155deg, rgba(100, 210, 255, 0.95), rgba(20, 110, 180, 0.98));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 2px 10px rgba(40, 150, 220, 0.3),
    inset 0 1px 0 rgba(220, 245, 255, 0.4);
}
.res-badge-custom {
  background: linear-gradient(155deg, rgba(130, 150, 165, 0.92), rgba(55, 75, 88, 0.96));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(220, 230, 240, 0.22);
}
.title-text {
  display: inline-block;
  max-width: 100%;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s ease;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}
.title-toned { font-weight: 600; }
.title-toned-pin { color: #ffb74d; }
/* 列表标签 → 资源名色（与角标色相呼应，彼此区分明显） */
.title-by-badge {
  font-weight: 500;
}
.title-tb-featured { color: #7ec8ff; }
.title-tb-essence { color: #b89cff; }
.title-tb-mustsee { color: #8fd8b8; }
.title-tb-hot { color: #7fb0ff; }
.title-tb-rec { color: #ffd88a; }
.title-tb-news { color: #d7ccc8; }
.title-tb-play { color: #b388ff; }
.title-tb-dlc { color: #40c4ff; }
.title-tb-x0 { color: #69f0ae; }
.title-tb-x1 { color: #ffab40; }
.title-tb-x2 { color: #18ffff; }
.title-tb-x3 { color: #ea80fc; }
.title-tb-x4 { color: #80cbc4; }
.table-row:hover .title-text:not(.title-by-badge) { color: #8fd0ff; }
.table-row:hover .title-text.title-toned-pin { color: #ffcc80; }
.table-row:hover .title-text.title-tb-featured { color: #bfe6ff; }
.table-row:hover .title-text.title-tb-essence { color: #ddd0ff; }
.table-row:hover .title-text.title-tb-mustsee { color: #c8f0dc; }
.table-row:hover .title-text.title-tb-hot { color: #a9c9ff; }
.table-row:hover .title-text.title-tb-rec { color: #ffe6b2; }
.table-row:hover .title-text.title-tb-news { color: #efebe9; }
.table-row:hover .title-text.title-tb-play { color: #d1c4e9; }
.table-row:hover .title-text.title-tb-dlc { color: #b3e5fc; }
.table-row:hover .title-text.title-tb-x0 { color: #b9f6ca; }
.table-row:hover .title-text.title-tb-x1 { color: #ffe082; }
.table-row:hover .title-text.title-tb-x2 { color: #84ffff; }
.table-row:hover .title-text.title-tb-x3 { color: #f8bbd0; }
.table-row:hover .title-text.title-tb-x4 { color: #b2dfdb; }
.row-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  transition: filter 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.cat-pill[class*="cat-tone-"]:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.cat-pill-muted {
  opacity: 0.65;
  border-style: dashed;
  color: #9fb2da;
  border-color: rgba(130, 160, 210, 0.4);
  background: rgba(40, 60, 110, 0.25);
}
/* 分类标签：色相拉开 + 左侧色点，一眼能区分，仍属冷色体系 */
.cat-pill[class*="cat-tone-"] {
  padding-left: 8px;
  gap: 0;
}
/* 资源列表「分类」列：标签略加宽（需覆盖上方色点标签的 padding） */
.row-cats .cat-pill {
  padding: 7px 20px;
  flex-shrink: 0;
  font-size: 11px;
}
.row-cats .cat-pill[class*="cat-tone-"] {
  padding-left: 12px;
}
.cat-pill[class*="cat-tone-"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.cat-pill.cat-tone-0 {
  color: #dce8ff;
  border-color: rgba(130, 175, 255, 0.62);
  background: linear-gradient(145deg, rgba(45, 75, 150, 0.55), rgba(22, 38, 88, 0.5));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.18);
}
.cat-pill.cat-tone-0::before {
  background: linear-gradient(145deg, #9ec5ff, #5b8ae8);
  box-shadow:
    0 0 12px rgba(130, 180, 255, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.cat-pill.cat-tone-1 {
  color: #ebe4ff;
  border-color: rgba(190, 165, 255, 0.55);
  background: linear-gradient(145deg, rgba(95, 65, 155, 0.52), rgba(48, 32, 95, 0.48));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 2px 10px rgba(0, 0, 0, 0.18);
}
.cat-pill.cat-tone-1::before {
  background: linear-gradient(145deg, #d4b8ff, #9b6ee8);
  box-shadow:
    0 0 12px rgba(180, 140, 255, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
/* 单机游戏等：偏翠绿/青绿，与蓝青系软件标签明显区分 */
.cat-pill.cat-tone-2 {
  color: #d8fff0;
  border-color: rgba(72, 220, 160, 0.55);
  background: linear-gradient(145deg, rgba(18, 95, 72, 0.58), rgba(12, 58, 48, 0.52));
  box-shadow:
    inset 0 1px 0 rgba(200, 255, 230, 0.12),
    0 2px 10px rgba(0, 0, 0, 0.18);
}
.cat-pill.cat-tone-2::before {
  background: linear-gradient(145deg, #5ef5b8, #0d9f6e);
  box-shadow:
    0 0 12px rgba(60, 230, 150, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
}
.cat-pill.cat-tone-3 {
  color: #e8e6ff;
  border-color: rgba(150, 140, 255, 0.55);
  background: linear-gradient(145deg, rgba(58, 48, 130, 0.58), rgba(32, 26, 78, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(220, 215, 255, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.18);
}
.cat-pill.cat-tone-3::before {
  background: linear-gradient(145deg, #c4b5ff, #6c5ce8);
  box-shadow:
    0 0 12px rgba(150, 130, 255, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
/* 未映射分类哈希档：钢青蓝，与 tone-2 绿、tone-6 琥珀区分 */
.cat-pill.cat-tone-4 {
  color: #e0f0ff;
  border-color: rgba(100, 170, 240, 0.5);
  background: linear-gradient(145deg, rgba(32, 72, 118, 0.58), rgba(18, 42, 72, 0.52));
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.18);
}
.cat-pill.cat-tone-4::before {
  background: linear-gradient(145deg, #7cc4ff, #2a78d4);
  box-shadow:
    0 0 12px rgba(90, 170, 255, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.cat-pill.cat-tone-5 {
  color: #ffe8f2;
  border-color: rgba(255, 130, 180, 0.48);
  background: linear-gradient(145deg, rgba(110, 40, 78, 0.55), rgba(62, 22, 48, 0.5));
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 230, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.18);
}
.cat-pill.cat-tone-5::before {
  background: linear-gradient(145deg, #ff8ec8, #e040a8);
  box-shadow:
    0 0 12px rgba(255, 120, 180, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
/* 软件工具：暖琥珀，与冷色分类一眼区分 */
.cat-pill.cat-tone-6 {
  color: #fff6e5;
  border-color: rgba(255, 190, 100, 0.55);
  background: linear-gradient(145deg, rgba(120, 72, 28, 0.58), rgba(72, 42, 14, 0.52));
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.14),
    0 2px 10px rgba(0, 0, 0, 0.2);
}
.cat-pill.cat-tone-6::before {
  background: linear-gradient(145deg, #ffd54f, #e65100);
  box-shadow:
    0 0 12px rgba(255, 180, 60, 0.65),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}
/* 扩展哈希档：玫红偏品红 */
.cat-pill.cat-tone-7 {
  color: #ffeaf5;
  border-color: rgba(255, 120, 200, 0.5);
  background: linear-gradient(145deg, rgba(105, 32, 85, 0.56), rgba(58, 18, 52, 0.5));
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 230, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.18);
}
.cat-pill.cat-tone-7::before {
  background: linear-gradient(145deg, #ff7eb8, #c2185b);
  box-shadow:
    0 0 12px rgba(255, 100, 160, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.row-type {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
}
.table-head > div:nth-child(3) {
  text-align: center;
}
.title-tooltip {
  position: fixed;
  z-index: 150;
  max-width: min(520px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #eaf1ff !important;
  border: 1px solid rgba(145, 190, 255, 0.55);
  background-color: rgba(11, 21, 42, 0.98) !important;
  background-image: linear-gradient(165deg, rgba(22, 38, 78, 0.95), rgba(10, 18, 38, 0.98));
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(120, 175, 255, 0.14),
    0 0 22px rgba(100, 160, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  word-break: break-word;
  white-space: pre-wrap;
}
.title-tooltip.show {
  opacity: 1;
}
.type-pill {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(153, 189, 255, 0.65);
  background: linear-gradient(180deg, rgba(96, 143, 242, 0.34), rgba(62, 103, 196, 0.3));
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  color: #dbe8ff;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(8, 22, 52, 0.32), inset 0 0 0 1px rgba(182, 215, 255, 0.12);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease, color .18s ease;
}
.type-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(220, 240, 255, 0.42) 48%, transparent 78%);
  transform: translateX(-130%);
  opacity: 0;
  transition: transform .34s ease, opacity .2s ease;
  pointer-events: none;
}
.type-pill:hover {
  color: #eff8ff;
  transform: translateY(-1px);
  border-color: rgba(179, 219, 255, 0.95);
  box-shadow:
    0 8px 16px rgba(10, 30, 72, 0.45),
    0 0 14px rgba(108, 175, 255, 0.34),
    inset 0 0 0 1px rgba(211, 236, 255, 0.24);
}
.type-pill:hover::before {
  opacity: 1;
  transform: translateX(130%);
}
.type-pill:active {
  transform: translateY(0);
  filter: brightness(0.95);
  box-shadow: 0 3px 8px rgba(8, 24, 58, 0.5), inset 0 0 0 1px rgba(186, 219, 255, 0.18);
}
.type-pill-muted {
  opacity: .7;
  border-style: dashed;
  pointer-events: none;
}
.empty-card { padding: 24px; color: #bdd0f8; text-align: center; }

.pager {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#pageJumpInput {
  width: 84px;
  padding: 8px 10px;
  text-align: center;
}
#pageJumpInput::-webkit-outer-spin-button,
#pageJumpInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#pageJumpInput[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.ad-side {
  display: grid;
  gap: 16px;
  position: sticky;
  /* 进一步减少侧边广告“顶上空太多”：让第一张广告尽量贴近顶部 */
  top: 26px;
  max-height: calc(100vh - 22px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 184, 255, 0.75) rgba(20, 34, 64, 0.5);
}
.ad-item {
  position: relative;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(151, 186, 255, 0.28);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(22, 34, 64, 0.84), rgba(14, 25, 47, 0.86));
  box-shadow: inset 0 0 0 1px rgba(173, 210, 255, 0.07), 0 8px 24px rgba(2, 8, 22, 0.35);
}
.ad-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(176, 215, 255, 0.2), transparent 42%, transparent 58%, rgba(132, 189, 255, 0.12));
}
.ad-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(176, 207, 255, 0.08);
}
.ad-item-visual {
  position: relative;
  display: block;
  border-radius: inherit;
  overflow: hidden;
}
.ad-item img {
  width: 100%;
  aspect-ratio: 19 / 9;
  height: auto;
  object-fit: cover;
  display: block;
}
/* 右上角分类/角标（后台「角标」字段，可空） */
.ad-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 5px 12px 6px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, #2f8bff 0%, #1a6ee6 45%, #0f52c4 100%);
  border-radius: 0 11px 0 12px;
  box-shadow: 0 2px 10px rgba(8, 50, 140, 0.5);
  line-height: 1.2;
  max-width: min(11em, calc(100% - 8px));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
/* 广告图名：在图片下方展示（与早期侧栏样式一致），不在图内叠层 */
.ad-title {
  position: relative;
  z-index: 1;
  padding: 8px 10px 10px;
  font-size: 12px;
  color: #d6e6ff;
  line-height: 1.35;
  word-break: break-word;
  text-align: center;
}
.ad-item:hover {
  border-color: rgba(165, 208, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(189, 223, 255, 0.14),
              0 12px 30px rgba(5, 13, 31, 0.45),
              0 0 16px rgba(116, 180, 255, 0.28);
}
.ad-item.no-link {
  cursor: default;
}

/* Hover 显示侧栏广告二维码 */
.ad-qr-tooltip {
  position: fixed;
  z-index: 9999;
  width: 210px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(10, 20, 40, 0.94);
  border: 1px solid rgba(151, 186, 255, 0.35);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  pointer-events: none; /* 防止二维码覆盖导致 hover 丢失 */
}

.ad-qr-tooltip img#adQrImg {
  width: 190px;
  height: 190px;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.ad-qr-tooltip .ad-qr-tip {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(214, 230, 255, 0.95);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.ad-qr-tooltip .ad-qr-tip-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(188, 215, 255, 0.86);
  text-align: center;
}

dialog {
  border: none;
  padding: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  width: min(800px, calc(100vw - 24px));
  font-size: 14px;
}

dialog[open] > article {
  animation: modalPop .34s cubic-bezier(.22, .61, .36, 1);
}

dialog:not(.notice-dialog-premium) > article {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  padding: 18px 22px 18px;
  background: linear-gradient(
    165deg,
    rgba(24, 42, 86, 0.92) 0%,
    rgba(8, 15, 34, 0.96) 100%
  );
  border: 1px solid rgba(150, 195, 255, 0.42);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(112, 170, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -20px 60px rgba(100, 160, 255, 0.05);
}

dialog:not(.notice-dialog-premium) > article::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 18% 0%, rgba(120, 175, 255, 0.18), transparent 55%),
    radial-gradient(90% 60% at 100% 20%, rgba(92, 240, 255, 0.12), transparent 55%);
}

dialog:not(.notice-dialog-premium) > article::before {
  content: "";
  position: absolute;
  left: -45%;
  right: -45%;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(91, 140, 255, 0),
    rgba(91, 140, 255, 0.85),
    rgba(92, 240, 255, 0.75),
    rgba(196, 163, 255, 0.75),
    rgba(91, 140, 255, 0)
  );
  background-size: 220% 100%;
  animation: noticeAccentFlow 10s linear infinite;
  opacity: 0.9;
}
#detailTitle {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  background: linear-gradient(90deg, #d9e9ff, #8fc7ff, #b6f0ff, #d9e9ff);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 16px 50px rgba(120, 189, 255, 0.16);
}

#demandDialog h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  background: linear-gradient(90deg, #d9e9ff, #8fc7ff, #b6f0ff, #d9e9ff);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 16px 50px rgba(120, 189, 255, 0.16);
}

#detailContent .detail-desc-block {
  margin: 0 0 14px;
  line-height: 1.65;
  color: rgba(220, 232, 255, 0.92);
  font-size: 14px;
}
#detailContent .detail-unzip-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(140, 185, 255, 0.38);
  background: linear-gradient(135deg, rgba(50, 90, 180, 0.28), rgba(20, 40, 90, 0.4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#detailContent .detail-unzip-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 213, 120, 0.95);
  flex-shrink: 0;
}
#detailContent .detail-unzip-code {
  font-size: 15px;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  color: #f5f8ff;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  word-break: break-all;
  flex: 1 1 120px;
  min-width: 0;
}
#detailContent .detail-unzip-copy-btn {
  flex-shrink: 0;
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(150, 200, 255, 0.55);
  background:
    linear-gradient(180deg, rgba(95, 150, 240, 0.5), rgba(40, 85, 190, 0.65)),
    rgba(12, 28, 64, 0.9);
  color: #f2f8ff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(0, 14, 44, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: filter 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
#detailContent .detail-unzip-copy-btn:hover {
  filter: brightness(1.1);
  border-color: rgba(210, 235, 255, 0.85);
}
#detailContent .detail-unzip-copy-btn:active {
  transform: scale(0.98);
}
#detailContent .detail-unzip-copy-btn.is-copied {
  border-color: rgba(120, 230, 180, 0.65);
  background: linear-gradient(180deg, rgba(80, 200, 150, 0.45), rgba(30, 100, 80, 0.7));
}
#detailContent .detail-body-block {
  margin: 0 0 16px;
  line-height: 1.65;
}
dialog::backdrop {
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(40, 90, 180, 0.23), transparent 55%),
    radial-gradient(ellipse 90% 60% at 15% 20%, rgba(120, 230, 255, 0.12), transparent 55%),
    rgba(4, 8, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#noticeDialog.notice-dialog-premium {
  border: none;
  background: transparent;
  padding: 0;
  width: min(560px, calc(100vw - 28px));
  max-width: 100%;
  color: var(--text);
  box-shadow: none;
}
#noticeDialog.notice-dialog-premium::backdrop {
  background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(40, 90, 180, 0.25), transparent 55%),
    rgba(4, 8, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.notice-dialog-inner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(150, 195, 255, 0.38);
  background: linear-gradient(165deg, rgba(22, 38, 78, 0.97) 0%, rgba(8, 14, 32, 0.99) 100%);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(100, 160, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.notice-dialog-inner::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #5b8cff, #5cf0ff, #c4a3ff, #5b8cff);
  background-size: 220% 100%;
  animation: noticeAccentFlow 10s linear infinite;
}
@keyframes noticeAccentFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}
.notice-dialog-scroll {
  max-height: min(58vh, 460px);
  overflow-y: auto;
  line-height: 1.75;
  padding: 22px 24px 8px;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #e8f0ff;
  word-break: break-word;
  white-space: normal;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 184, 255, 0.9) rgba(12, 23, 48, 0.7);
}
#noticeDialogContent.notice-dialog-scroll p {
  margin: 0 0 12px;
}
#noticeDialogContent .notice-body-img-wrap {
  margin: 12px 0;
  text-align: center;
}
#noticeDialogContent .notice-body-img-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(140, 180, 255, 0.38);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  vertical-align: middle;
}
#noticeDialogContent a {
  color: #a8d8ff;
  word-break: break-all;
  text-decoration: none;
  border-bottom: 1px solid rgba(140, 200, 255, 0.35);
}
#noticeDialogContent a:hover {
  color: #d4ecff;
  border-bottom-color: rgba(200, 230, 255, 0.65);
}
#noticeDialogContent .notice-dialog-more {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(120, 165, 230, 0.28);
}
.notice-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 20px;
  border-top: 1px solid rgba(100, 145, 220, 0.18);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12));
}
.notice-dialog-close {
  min-width: 120px;
  border-radius: 12px !important;
  padding: 10px 22px !important;
  border: 1px solid rgba(160, 205, 255, 0.55) !important;
  background: linear-gradient(180deg, rgba(95, 140, 220, 0.45), rgba(45, 75, 150, 0.5)) !important;
  color: #f0f6ff !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 20px rgba(8, 20, 50, 0.45), inset 0 0 0 1px rgba(200, 230, 255, 0.12) !important;
}
.notice-dialog-close:hover {
  filter: brightness(1.08);
  border-color: rgba(200, 230, 255, 0.75) !important;
}
.dialog-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(100, 145, 220, 0.18);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12));
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.meta { color: var(--muted); }

#demandSubmitMsg.demand-msg-success {
  color: #d4ffe8;
  font-weight: 600;
  font-size: 13px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 230, 180, 0.55);
  background: linear-gradient(135deg, rgba(46, 140, 96, 0.35), rgba(30, 90, 70, 0.25));
  text-align: center;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #e8fff4;
  text-align: center;
  line-height: 1.45;
  border: 1px solid rgba(140, 235, 190, 0.65);
  background: linear-gradient(145deg, rgba(52, 160, 110, 0.92), rgba(28, 100, 78, 0.95));
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(100, 220, 160, 0.35);
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.disk-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.disk-qr-modal[hidden] {
  display: none !important;
}
.disk-qr-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 12%, rgba(84, 144, 255, 0.26), transparent 42%),
    radial-gradient(circle at 85% 16%, rgba(109, 239, 255, 0.22), transparent 44%),
    rgba(4, 8, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.disk-qr-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 28px));
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 190, 255, 0.44);
  background:
    linear-gradient(160deg, rgba(24, 42, 86, 0.96) 0%, rgba(9, 17, 40, 0.98) 100%);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(112, 170, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -18px 50px rgba(100, 160, 255, 0.08);
  animation: modalPop .34s cubic-bezier(.22, .61, .36, 1);
}
.disk-qr-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f88ff, #53ecff, #b394ff, #4f88ff);
  background-size: 220% 100%;
  animation: noticeAccentFlow 9s linear infinite;
}
.disk-qr-close {
  position: absolute;
  right: 14px;
  top: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(175, 213, 255, 0.5);
  background: linear-gradient(180deg, rgba(109, 152, 238, 0.36), rgba(40, 73, 140, 0.52));
  color: #f2f7ff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
  box-shadow: 0 8px 20px rgba(0, 12, 36, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.disk-qr-close:hover {
  transform: translateY(-1px) scale(1.04);
  color: #fff;
  border-color: rgba(255, 120, 120, 0.8);
  background: linear-gradient(180deg, rgba(255, 108, 108, 0.86), rgba(214, 47, 47, 0.88));
  box-shadow: 0 10px 24px rgba(125, 18, 18, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.disk-qr-head {
  text-align: center;
  padding: 24px 56px 10px;
}
.disk-qr-head h3 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ecf5ff;
  text-shadow: 0 5px 20px rgba(66, 133, 255, 0.35);
}
.disk-qr-subtitle {
  margin: 8px 0 0;
  color: rgba(205, 225, 255, 0.9);
  font-size: 15px;
  text-align: center;
}
.disk-qr-body {
  padding: 8px 22px 22px;
}
.disk-qr-image-wrap {
  width: min(240px, 80vw);
  margin: 0 auto;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(164, 206, 255, 0.58);
  background: linear-gradient(180deg, rgba(234, 244, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow:
    0 14px 30px rgba(0, 6, 22, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}
#diskQrImg {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  background: #fff;
}
.disk-qr-quark-tip {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(120, 210, 255, 0.55);
  color: #c8f0ff;
  background: linear-gradient(135deg, rgba(60, 160, 255, 0.22), rgba(30, 90, 160, 0.14));
  box-shadow: 0 6px 18px rgba(20, 80, 140, 0.2);
}
.disk-qr-quark-tip[hidden] {
  display: none !important;
}
.disk-qr-urgency {
  margin: 16px 0 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 156, 156, 0.52);
  background: linear-gradient(145deg, rgba(255, 92, 113, 0.9), rgba(244, 74, 95, 0.84));
  color: #fff;
  box-shadow: 0 10px 26px rgba(130, 20, 35, 0.35);
}
.disk-qr-urgency-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  font-size: clamp(13px, 2.75vw, 17px);
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}
.disk-qr-urgency-text {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}
.disk-qr-urgency-time {
  flex-shrink: 0;
  white-space: nowrap;
}
#diskQrCountdown,
.disk-qr-countdown-digits {
  color: #fff78a;
  text-shadow: 0 0 10px rgba(255, 248, 160, 0.65);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.disk-qr-notice {
  display: grid;
  gap: 10px;
}
.disk-qr-notice > div {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}
.disk-qr-notice > div:first-child {
  border: 1px solid rgba(255, 167, 88, 0.58);
  color: #ffe1bb;
  background: linear-gradient(135deg, rgba(255, 152, 73, 0.16), rgba(156, 94, 35, 0.12));
}
.disk-qr-notice > div:last-child {
  border: 1px solid rgba(134, 220, 160, 0.52);
  color: #d4ffe3;
  background: linear-gradient(135deg, rgba(68, 180, 112, 0.18), rgba(36, 112, 78, 0.12));
}
.disk-qr-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.disk-qr-actions[hidden] {
  display: none !important;
}
.disk-qr-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #0d1a14;
  background: linear-gradient(180deg, #9effc8 0%, #5ed399 100%);
  border: 1px solid rgba(120, 255, 190, 0.45);
  box-shadow: 0 4px 18px rgba(80, 220, 150, 0.28);
}
.disk-qr-open-link:hover {
  filter: brightness(1.06);
}
.disk-qr-footer-tips {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}
.disk-qr-footer-tips p {
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(196, 212, 242, 0.82);
  text-align: center;
}
@media (max-width: 1200px) {
  /* 中等屏不再让「分类」占据过高纵向空间：改为自适应网格 */
  #categoryList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    align-items: stretch;
    justify-items: stretch;
  }

  #categoryList li {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
  }
}

@media (max-width: 640px) {
  .disk-qr-head { padding: 22px 52px 8px; }
  .disk-qr-head h3 { font-size: 28px; }
  .disk-qr-subtitle { font-size: 14px; }
  .disk-qr-body { padding: 8px 16px 18px; }
  .disk-qr-urgency-main {
    font-size: clamp(12px, 3.4vw, 15px);
  }
  .disk-qr-notice > div { font-size: 14px; }
  .disk-qr-quark-tip { font-size: 14px; }
}

/* 中等及以下屏幕：让下半区与上半区一致进入响应式布局 */
@media (max-width: 1200px) {
  html, body {
    overflow-y: auto;
  }
  body {
    overflow-x: hidden;
  }

  .container {
    width: calc(100vw - 24px);
  }

  .page-shell {
    grid-template-columns: 1fr;
    min-width: 0;
    overflow-x: visible;
  }

  .layout {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  #categoryPanel,
  .resource-panel {
    max-height: none;
  }

  #resourceList {
    overflow: visible;
    max-height: none;
  }

  .ad-side {
    display: none;
  }

  .ad-rail-mobile {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    margin-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .ad-rail-mobile .ad-item {
    flex: 0 0 min(58vw, 360px);
    scroll-snap-align: start;
  }
}

.compliance-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.compliance-modal.show { display: flex; }
.compliance-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 15%, rgba(89, 133, 255, 0.24), transparent 44%),
              radial-gradient(circle at 82% 22%, rgba(86, 220, 255, 0.2), transparent 40%),
              rgba(3, 8, 18, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modalFade .35s ease;
}
.compliance-card {
  position: relative;
  width: min(920px, calc(100vw - 34px));
  border: 1px solid rgba(159, 192, 255, 0.35);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 28, 56, 0.97), rgba(11, 20, 41, 0.97));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58), inset 0 0 36px rgba(118, 182, 255, 0.08);
  overflow: hidden;
  animation: modalPop .38s cubic-bezier(.22, .61, .36, 1);
}
.compliance-card::before {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  width: 55%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(174, 220, 255, 0.9), transparent);
  animation: sweep 3.8s linear infinite;
}
.compliance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(123, 165, 245, 0.25);
}
.compliance-head h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: .4px;
}
.compliance-tag {
  font-size: 12px;
  color: #d7f1ff;
  border: 1px solid rgba(140, 190, 255, 0.6);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(102, 156, 255, 0.18);
}
.compliance-content {
  padding: 18px 22px 6px;
  max-height: min(56vh, 520px);
  overflow: auto;
  color: #dbe7ff;
  line-height: 1.95;
  font-size: 16px;
}
.compliance-content p { margin: 0 0 20px; text-indent: 2em; }
.compliance-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(123, 165, 245, 0.22);
}
.ghost-btn, .primary-btn {
  min-width: 140px;
  border-radius: 12px;
  font-size: 15px;
}
.ghost-btn {
  background: rgba(100, 122, 168, 0.24);
  border: 1px solid rgba(132, 155, 202, 0.45);
}
.primary-btn {
  background: linear-gradient(90deg, #6c67ff, #9a40f2);
  border: 1px solid rgba(198, 157, 255, 0.7);
  color: #fff;
  box-shadow: 0 6px 16px rgba(152, 82, 255, 0.34);
}
.primary-btn:hover { filter: brightness(1.06); }

body.modal-open { overflow: hidden; }

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.975) rotateX(8deg);
    filter: blur(2px) saturate(1.05);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0) saturate(1);
  }
}
@keyframes sweep {
  from { transform: translateX(0); }
  to { transform: translateX(300%); }
}
@keyframes brandFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 240% 50%; }
}
@keyframes subtitleGlow {
  0%, 100% { opacity: 0.35; transform: scaleX(0.92); }
  50% { opacity: 0.82; transform: scaleX(1); }
}
@keyframes dreamFlow {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); filter: saturate(100%); }
  100% { transform: translate3d(2%, 1.5%, 0) scale(1.04); filter: saturate(116%); }
}
@keyframes orbFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(22px, -14px, 0) scale(1.08); }
}
@keyframes orbFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-18px, 20px, 0) scale(1.06); }
}
@keyframes orbPulse {
  0%, 100% { opacity: 0.18; transform: scale(0.96); }
  50% { opacity: 0.52; transform: scale(1.03); }
}
@keyframes brandLogoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(120, 189, 255, 0.32);
  }
  50% {
    transform: scale(1.14);
    box-shadow: 0 0 16px rgba(125, 200, 255, 0.56);
  }
}
@keyframes gridSweep {
  0% { transform: translateX(-85%); opacity: 0; }
  20% { opacity: 0.12; }
  80% { opacity: 0.12; }
  100% { transform: translateX(85%); opacity: 0; }
}

@media (max-width: 1200px) {
  html, body {
    overflow-x: hidden;
  }

  .container {
    width: calc(100vw - 24px);
  }

  .page-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-width: 0;
    overflow-x: visible;
  }

  .layout {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  #categoryPanel,
  .resource-panel {
    max-height: none;
  }

  #resourceList {
    overflow-y: visible;
  }

  .ad-side {
    display: none;
  }

  .ad-rail-mobile {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    margin-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .ad-rail-mobile .ad-item {
    flex: 0 0 min(78vw, 320px);
  }
}

@media (max-width: 520px) {
  .page-shell { grid-template-columns: 1fr; }
  .ad-side {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .layout { grid-template-columns: 1fr; }
  .resource-panel { max-height: none; }
  #resourceList { overflow: visible; }
}

@media (max-width: 520px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .notice-expand-toggle {
    display: flex;
  }

  .page-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow-x: visible;
  }
  .layout { min-width: 0; }

  .container { width: calc(100vw - 20px); }

  #categoryList {
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    gap: 8px;
  }

  #categoryList li {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 11px;
  }
  .topbar-inner { flex-direction: column; align-items: flex-start; }
  .brand-logo {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    border-radius: 5px;
  }
  .toolbar {
    grid-template-columns: 1fr;
  }
  .cat-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(146, 187, 255, 0.62);
    background:
      linear-gradient(180deg, rgba(83, 129, 226, 0.44), rgba(36, 64, 134, 0.56)),
      rgba(9, 20, 44, 0.88);
    color: #eaf3ff;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    box-shadow:
      0 6px 14px rgba(8, 21, 52, 0.35),
      inset 0 0 0 1px rgba(181, 218, 255, 0.1);
  }
  .cat-toggle-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(220, 240, 255, 0.9);
    transform: translateY(1px);
  }

  /* 小屏：分类折叠为抽屉，避免挤占搜索框位置 */
  #categoryPanel {
    display: none;
  }
  body.cat-open #categoryPanel {
    display: block;
    position: fixed;
    left: 10px;
    right: 10px;
    top: 84px;
    max-height: min(72vh, calc(100vh - 120px));
    overflow: auto;
    z-index: 220;
    padding: 14px;
  }
  .category-backdrop {
    position: fixed;
    inset: 0;
    background:
      radial-gradient(circle at 20% 10%, rgba(89, 133, 255, 0.26), transparent 45%),
      radial-gradient(circle at 85% 18%, rgba(109, 239, 255, 0.18), transparent 45%),
      rgba(4, 8, 18, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 210;
  }
  body.cat-open .category-backdrop {
    display: block;
  }

  /* 窄屏/窗口较小时：主统计移到列表与分页下方，与「当前页统计」同处底部区域 */
  .resource-panel {
    display: flex;
    flex-direction: column;
  }
  .resource-panel > .toolbar {
    order: 1;
  }
  .resource-panel > .cards {
    order: 2;
  }
  .resource-panel > .pager-page-row {
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .resource-panel > .stats-primary {
    order: 4;
    margin-top: 10px;
  }
  .pager-page-row .stats-page {
    min-width: 0;
  }

  .table-head { display: none; }
  .table-head, .table-row { grid-template-columns: 1fr; }
  .row-title { flex-wrap: wrap; align-items: flex-start; }
  .res-badges { max-width: 100%; }
  /* 小屏资源行：标题一行，按钮一行（同一行并排） */
  .row-cats { display: none; }
  .row-type, .row-time { padding-top: 0; }
  .row-type {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .row-type::-webkit-scrollbar { height: 6px; }
  .row-type::-webkit-scrollbar-thumb {
    background: rgba(150, 190, 255, 0.25);
    border-radius: 999px;
  }
  .row-type::-webkit-scrollbar-track { background: transparent; }
  .type-pill { flex: 0 0 auto; }

  /* 小屏广告位：左右广告合并到一个横向轨道，可左右滑动，保留横向滚动条提示 */
  .ad-side {
    display: none;
  }
  .ad-rail-mobile {
    display: flex;
    gap: 10px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 4px;
    margin-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    overscroll-behavior-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(150, 190, 255, 0.55) rgba(20, 34, 64, 0.45);
  }

  /* 手机：强制触摸手势仅用于广告横向滑动 */
  .ad-rail-mobile,
  .ad-rail-mobile a,
  .ad-rail-mobile .ad-item {
    touch-action: pan-x;
  }
  .ad-rail-mobile::-webkit-scrollbar {
    height: 8px;
  }
  .ad-rail-mobile::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(160, 205, 255, 0.45), rgba(100, 150, 255, 0.35));
    border-radius: 999px;
    border: 1px solid rgba(120, 170, 255, 0.25);
  }
  .ad-rail-mobile::-webkit-scrollbar-track {
    background: rgba(14, 24, 47, 0.65);
    border-radius: 999px;
  }
  .ad-rail-mobile .ad-item {
    flex: 0 0 min(78vw, 320px);
    scroll-snap-align: start;
  }

  .compliance-content { font-size: 14px; line-height: 1.75; }
  .compliance-actions { justify-content: center; }
  .ghost-btn, .primary-btn { min-width: 120px; }
}
